On Fri, Apr 15, 2016 at 06:54:55PM +0200, Laurent Bigonville wrote:
Package: nginx
Version: 1.6.2-3
Severity: normal
User: pkg-systemd-maintain...@lists.alioth.debian.org
Hi,
Wouldn't it be better to use KillSignal=SIGQUIT in the .service file
rather than using this hack?
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile
/run/nginx.pid
Is it necessary really necessary to send QUIT, then TERM and then KILL?
By using KillSignal=SIGQUIT systemd would forcibly (SIGKILL) nginx after
the timeout is reached.
SIGQUIT triggers graceful shutdown so it waits for all existing client
connections to terminate. If for example you have websocket or SSE long
running clients you will hit the timeout. In such cases we don't want
systemd to SIGKILL nginx.
The current solution fallbacks to SIGTERM that forces systemd to close
existing clients and terminate.