8000 Prevent "[CRITICAL] WORKER TIMEOUT" error message by grayside · Pull Request #3229 · GoogleCloudPlatform/python-docs-samples · GitHub
[go: up one dir, main page]

Skip to content

Prevent "[CRITICAL] WORKER TIMEOUT" error message #3229

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

Merged
merged 2 commits into from
Mar 31, 2020
Merged

Conversation

grayside
Copy link
Collaborator

When a Cloud Run container instance idles between requests and withdraws CPU, there is a lack of heartbeat from the worker to the gunicorn arbiter process. A service in this state can have "WORKER TIMEOUT" error logs once CPU is restored upon receiving an HTTP request.

The timeout on workers is not an essential part of server resource management. Per benoitc/gunicorn#2291, gunicorn supports setting an unlimited timeout with --timeout 0. Let's do that to clean up the logs.

@grayside grayside requested review from averikitsch and a team as code owners March 30, 2020 22:34
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 30, 2020
@grayside grayside removed the request for review from leahecole March 30, 2020 22:46
@grayside grayside assigned grayside and unassigned leahecole Mar 31, 2020
@grayside grayside merged commit 9e64bff into master Mar 31, 2020
@grayside grayside deleted the run/python-timeout branch March 31, 2020 21:57
markhobson added a commit to acteng/update-your-capital-schemes that referenced this pull request Oct 11, 2023
Prevents `[CRITICAL] WORKER TIMEOUT` log messages when Cloud Run takes resources
away from Gunicorn.

Recommended by:

https://cloud.google.com/run/docs/tips/python#optimize_the_wsgi_server

More info:

GoogleCloudPlatform/python-docs-samples#3229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0