Comment 5 for bug 2054301

Revision history for this message
thermoman (thermoman) wrote (last edit ): Re: [worker/event] Some child processes aren't killed on reload (graceful), being stuck in state "Sending Reply", leaves old logfiles open, disk filles up, server stops responding after some days

Hi Sergio,

do you really mean "systemctl restart apache2"? Because this will disrupt service and stop the whole webserver and then start it again.

I guess you meant "systemctl reload apache2".

The issue is the same, since they all do the same:

logrotate calls "invoke-rc.d apache2 reload" which calls "/etc/init.d/apache2 reload" which calls "apache2ctl graceful":

% grep -A 6 -F 'do_reload()' /etc/init.d/apache2
do_reload() {
 if apache_conftest; then
         if ! pidofproc -p $PIDFILE "$DAEMON" > /dev/null 2>&1 ; then
                 APACHE2_INIT_MESSAGE="Apache2 is not running"
                 return 2
         $APACHE2CTL graceful > /dev/null 2>&1

systemd does the same:

% cat /lib/systemd/system/apache2.service
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl graceful-stop
ExecReload=/usr/sbin/apachectl graceful

So it doesn't matter. You can even send SIGUSR1 to the apache2 father process which does the same:

AH00493: SIGUSR1 received. Doing graceful restart