Bug#380080: [pkg-lighttpd] Bug#380080: lighttpd: logrotate stops
servers, and sometimes it does not starts again
Pierre Habouzit
madcoder at debian.org
Mon Aug 7 22:34:53 UTC 2006
Le lun 7 août 2006 22:19, Krzysztof Krzyzaniak a écrit :
> Pierre Habouzit wrote:
> > Package: lighttpd
> > Version: 1.4.11-7
> > Severity: grave
> > Justification: renders package unusable
> >
> >
> > I use lighttpd on many servers, and sometimes, because of
> > logrotate, the server stops, but never starts again (presumably
> > because the sleep 5 is not enough, logs shows that it took 5
> > seconds to stop:
> >
> > 2006-07-27 06:25:20: (server.c.1216) [note] graceful shutdown
> > started 2006-07-27 06:25:24: (log.c.135) server stopped
> >
> > (1) I'm surprised that lighttpd is not able to understand a kill
> > -HUP to reload.
>
> It's because lighty dropping privileges after binding to port 80,
> there is discussion [1] and preliminary, experimental patch.
I understand that but ...
> > (2) even if it doesn't, it should be possible to wait until it's
> > really stopped before starting it again, instead of a crude
> > sleep.
> >
> > given that the logrotate fires the stop around 06:25, it causes
> > serious downtime, hence the severity.
it should still able to achieve that: having a way to tell *when* lighty
is properly shut down. because that's the problem here: you try to
restart lighty *before* it's actually shut down, and the second
instance fails because the first still listen on the :80.
IMHO, that could be done like that: at shutdown time, the master lighty
process just close ALL the binded sockets, so that the new instance can
be started immediately. a clever way would be that some tool connects
itself to an unix lighty control socket, asks for removal, and that
lighty says when it shutted all the sockets down just before closing
that socket. when that client retunrs, you can safely start a new
lighty.
that's simple and safe.
--
·O· Pierre Habouzit
··O madcoder at debian.org
OOO http://www.madism.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-lighttpd-maintainers/attachments/20060808/b9d62093/attachment-0001.pgp
More information about the pkg-lighttpd-maintainers
mailing list