#2726·gunicorn

gunicorn not compatible with systemd watchdog timeout

Author: huwcbjonesCreated Jan 19, 2022Updated Aug 16, 2026
LabelsDeployTo Review

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.