-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
remove checking timeouts while graceful stopping tornado worker #1106
Conversation
I think this is probably fine. @benoitc? |
👍 @keakon can you eventually squash the commits? Sorry for the delay to review it, I'm incredibly busy these days... |
Hello, @benoitc. The first 2 commits were about 2 years ago, and you should have merged it. Actually, there would be anther issue when I using Supervisor to manage Gunicorn process. The default graceful_timeout of Gunicorn is 30 seconds. So when I restarting Gunicorn master process, it will wait its workers to exit up to 30 seconds. I have changed the graceful_timeout to 8 seconds in my project, but I think there could be a mechanism to kill the workers once the master got killed. |
I should probably have but I am really busy these days launching a new business. About the patches can you split the prs? the possible infinite loop should be done in another PR. About the timeout can't you tell to supervisor to send a SIGTERM instead of a SIGQUIT? There is indeed already a mechanism to exit immediately Gunicorn. If it doesn't work with the tornado worker, let me know. |
OK, I have updated the pull request. Changing the signal is fine, but not graceful. Maybe adding a note in the document would be helpful. |
It seems like this is ready to go. I'm going to merge it. |
remove checking timeouts while graceful stopping tornado worker
@tilgovi thanks! @keakon it's document there: If you want something more explicit let me know :) |
remove checking timeouts while graceful stopping tornado worker
Tornado add many timeouts internally which can be ignored while graceful stopping.