How to make reload (SIGHUP) wait for worker readiness before shutting down old ones? #3404
Unanswered
salty-horse
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Django project takes a while to load and become ready to handle requests.
When running it with gunicorn (either
sync
orgevent
workers, withpreload_app = False
), it spawns the new workers, and immediately shuts down the old ones, even before the new workers have a chance to finish loading.Is there a way to tell gunicorn to wait until the worker is ready? I thought that's what
post_worker_init
is for, but the old workers are shut down before wait for it to complete.Beta Was this translation helpful? Give feedback.
All reactions