GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: call `gc.collect()` when exiting the NDB runtime context by chrisrossi · Pull Request #373 · googleapis/python-ndb

This repository was archived by the owner on May 6, 2026. It is now read-only.

Conversation

@chrisrossi

@chrisrossi chrisrossi commented Mar 20, 2020

Copy link
Copy Markdown
Contributor

This works around an issue where a thread started by google.auth
confuses the Google App Engine Python 2.7 runtime.

Fixes #336

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Chris Rossi
fix: call gc.collect() when exiting the NDB runtime context
8eb6251
This works around an issue where a thread started by `google.auth`
confuses the Google App Engine Python 2.7 runtime.

Fixes googleapis#336
@chrisrossi
chrisrossi requested review from andrewsg and crwilcox as code owners March 20, 2020 18:53
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 20, 2020
@chrisrossi

chrisrossi commented Mar 20, 2020

Copy link
Copy Markdown
Contributor Author

It's worth noting that the issue being worked around is a product of a recent commit to google.auth:

googleapis/google-auth-library-python@0c33e9c#diff-ce8fd607d554afd5f68f90b463e6b6ea

This is the same proximal cause of #343. In the case of #343, there already seems to be a memory leak which is simply aggravated by that commit, turning it into a thread leak.

Might be worth some discussion with the google.auth library maintainers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cguardia
cguardia approved these changes Mar 20, 2020
View reviewed changes

@cguardia cguardia left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chrisrossi

chrisrossi commented Mar 24, 2020

Copy link
Copy Markdown
Contributor Author

@busunkim96 This works around the issue with google.auth we were discussing. Do you anticipate a release of google.auth soon to fix this, or should we go ahead and merge this as a stopgap?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@busunkim96

busunkim96 commented Mar 24, 2020

Copy link
Copy Markdown
Contributor

@chrisrossi googleapis/google-auth-library-python#467 reverts the change. I'm just waiting for a review. The release will happen today or at the latest tomorrow morning.

chmoder and chrisrossi reacted with heart emoji
All reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrisrossi

chrisrossi commented Apr 9, 2020

Copy link
Copy Markdown
Contributor Author

Not going to merge since work-around is no longer needed. See: googleapis/google-auth-library-python#467

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrisrossi chrisrossi closed this Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@andrewsg andrewsg Awaiting requested review from andrewsg
@crwilcox crwilcox Awaiting requested review from crwilcox
1 more reviewer
@cguardia cguardia cguardia approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[GAE python 2.7] query().filter().fetch() sometimes spawns threads preventing webapp2 requests finish within a deadline

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@chrisrossi @busunkim96 @cguardia @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.