-
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
gunicorn not compatible with systemd watchdog timeout #2726
Comments
Related SO thread: https://stackoverflow.com/questions/63945102/gunicorn-with-systemd-watchdog How often would be too often too send |
Thanks for the SO link, I didn't manage to find that and it clears up a few preconceptions 👍🏻 We tend to notify |
At a glance, there would be a fair bit more work in taking e.g. So in terms of measuring the effort and effectiveness of implementing watchdog notifications, it would be good to gather feedback on whether:
Implementing |
There's a pure Python implementation of sd_notify here, fwiw: https://github.com/bb4242/sdnotify/blob/master/sdnotify/__init__.py |
By default systemd
WatchdogSec
"Defaults to 0, which disables this feature."When a service is configured with a watchdog, the service should notify systemd that it is still alive by sending
WATCHDOG=1
(keepalive ping) to ensure systemd doesn't kill the process.We'd like to enable this to ensure that systemd detects if gunicorn gets stuck, however at the moment I've got systemd aborting the main PID everytime the watchdog timer fires which took me a bit too long to realise! 😅
By default, I'd probably shove the keepalive in the main process, however I haven't looked too much into how gunicorn hangs together yet.
If you guys don't want to support the watchdog timer, it would be good to document that gunicorn is not compatible with it.
The text was updated successfully, but these errors were encountered: