[Pkg-nginx-maintainers] Bug#821114: nginx: Please use KillSignal=SIGQUIT in systemd service

Michael Biebl biebl at debian.org
Thu Nov 10 21:42:36 UTC 2016


On Tue, 8 Nov 2016 11:20:45 +0200 Christos Trochalakis
<yatiohi at ideopolis.gr> wrote:
> 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-maintainers at 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.
> 
> 

Would
ExecStop=/bin/kill -QUIT $MAINPID

work?
This would first send SIQUIT to the main process, after TimeoutStopSec=
it would send SIGTERM to all remaining processes and after another
TimeoutStopSec=, SIGKILL.
Is this the behaviour you want?

It feels a bit more systemdish to me then involving start-stop-daemon


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-nginx-maintainers/attachments/20161110/07731add/attachment.sig>


More information about the Pkg-nginx-maintainers mailing list