Throwing critical errors with Gunicorn without restarting #5837
Unanswered
supriyo-biswas
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Isn't the point of gunicorn to try and keep a process running? i.e. It would restart if the process stopped. |
Beta Was this translation helpful? Give feedback.
2 replies
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'm writing a web app where I need to validate some environment variables which are needed during the course of operation, and exit otherwise. With plain aiohttp, this is done fairly easily with startup handlers:
However, when I try to run the application with gunicorn, it seems that we restart the worker if the startup handler raises an exception:
Is there a way to throw errors from within the startup handler such that gunicorn doesn't restart workers, or another workaround that I can use to achieve this use case?
Beta Was this translation helpful? Give feedback.
All reactions