-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
google.cloud.logging: RuntimeError: cannot schedule new futures after shutdown #21
Comments
@ael-computas Could you let us know what exception you are seeing? I don't see it in the example code. Thanks! |
I am also experiencing this. It seems that despite the "Waiting up to 5 seconds." message, if you don't block the main thread after calling the logging functions you will get a RuntimeException. See stack trace below:
To see if it was due to the main thread shutting down before the background threads had completed processing I added some additional code which then allowed the logging to complete and it then succeeded:
An additional, but very peculiar point, is that most of the time the logging works fine until I log a WARNING level log, after which the problem is exacerbated. May just be coincidence though. |
@TanGolf Thank you for the additional details. Are you running the logging client in a multi-threaded environment? |
@busunkim96 No problem. Yes, that is correct. |
Had similar problems, as an workaround i added |
I tried running the provided code, but couldn't reproduce it. Since this is a year-old issue and we've released a number of updates since, I'm going to close this. If anyone still sees the issue, feel free to re-open and I can look at it again |
Running into a similar issue when using cloud run. the Cloud Run job is right from the official example here: https://cloud.google.com/run/docs/quickstarts/jobs/build-create-python
|
I keep receiving this exception on program shutdown and I cant figure out what to do to make a clean shutdown
Minimal code of main.py is something like this
The text was updated successfully, but these errors were encountered: