Bug#380080: [pkg-lighttpd] Bug#380080: lighttpd: logrotate stops servers, and sometimes it does not starts again

2006-08-07 Thread Krzysztof Krzyzaniak
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.


   (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.

[1]
http://article.gmane.org/gmane.comp.web.lighttpd/3752/match=graceful+restart

  eloy
-- 
[EMAIL PROTECTED]

   jak to dobrze, że są oceany - bez nich byłoby jeszcze smutniej



Bug#380080: [pkg-lighttpd] Bug#380080: lighttpd: logrotate stops servers, and sometimes it does not starts again

2006-08-07 Thread Pierre Habouzit
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[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgppE0r9X9uXN.pgp
Description: PGP signature


Bug#380080: lighttpd: logrotate stops servers, and sometimes it does not starts again

2006-07-27 Thread Pierre Habouzit
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.

  (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.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]