puppet: Use SIGINT to restart uwsgi.

This results in a brief service interruption (not a graceful restart),
but fixes a bug where on a `supervisorctl restart zulip-django`, we'd
end up leaking a bunch of uwsgi processes.

The mechanism was that sending SIGHUP to uwsgi was a command for it to
gracefully restart, so it'd start doing that (whereas supervisor
expected it to be dying)... and then supervisor would start up the new
uwsgi process group, resulting in 2 uwsgi process groups running.

This, in turn, led to a memory leak that could eventually result in
OOM kills.
This commit is contained in:
Tim Abbott
2017-01-28 22:24:11 -08:00
parent 4504818e5e
commit 2fb51ff876

View File

@@ -12,7 +12,7 @@ command=/home/zulip/deployments/current/zulip-current-venv/bin/uwsgi --ini /etc/
priority=100 ; the relative start priority (default 999)
autostart=true ; start at supervisord start (default: true)
autorestart=true ; whether/when to restart (default: unexpected)
stopsignal=HUP ; signal used to kill process (default TERM)
stopsignal=INT ; signal used to kill process (default TERM)
stopwaitsecs=30 ; max num secs to wait b4 SIGKILL (default 10)
user=zulip ; setuid to this UNIX account to run the program
redirect_stderr=true ; redirect proc stderr to stdout (default false)