Apache2 logrotate kills existing connections on server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Debian) |
Fix Released
|
Unknown
|
|||
apache2 (Ubuntu) |
Fix Released
|
Medium
|
Ubuntu Server |
Bug Description
Apache2 logrotate kills existing connections on server and momentarily rejects
requests
I havn't fully diagnosed this one, but I had several (5 parallel jobs) running
firing xmlrpc requests at an apache2 server overnight. All 5 jobs failed with
an invalid server response at 6:25am. Either one of two things (or both)
happened: they were in the middle of an API request that was terminated abruptly
prior to a proper response, or they made a request while the server was not
started. I'm not exactly sure which, but based on my apache knowledge, I would
assume both would occour in the ubuntu configuration, as described below.
Looking in /etc/logrotate.
it looks like it does an /etc/init.d/apache2 restart
looking in /etc/init.
According to this documentation:
http://
stop will IMMEDIATELY kill off all of the children. Which is obviously bad bad bad.
I would assume the line in the logrotate.d/apache2 file should read
/etc/init.d/apache reload
Which should translate to a graceful restart of apache2, thusly not killing
existing connections, and not momentarily rejecting incoming reuqests.
Changed in apache2: | |
status: | Unknown → Fix Committed |
Changed in apache2: | |
status: | Fix Committed → Fix Released |
Changed in apache2: | |
assignee: | adconrad → ubuntu-server |
/etc/logrotate. d/apache2 is a conffile, meaning your changes won't get
overwritten by us on upgrade, so feel free to change your local version. The
default is to do a hard restart because we've seen many other instances where
graceful would cause the server to die completely when some rogue extension or
other segfaults as the parent reloads, leaving you with NO apache from 6:25
onward. I decided at that time that the current compromise was the lesser of
two evils.
I'm still trying to figure out the best way to serve everyone well here without
the world blowing up. ;)