Comment 55 for bug 1832182

Revision history for this message
Christoph Lechleitner (clechleitner42) wrote :

> Not being able to do a graceful apache restart is a bummer.

That's putting it mildly, and it seems totally unnecessary because systemd can reload apache just fine, see below.

First a note on the effect of restarting Apache:

Everytime Apache restarts we kick out up to 100s of active client connections.

On We also have tens of JK workers on some servers, connected to tens of Tomcat instances. This slows down the restart considerably.

Secondly to the "unnecessary" part:

SystemD is not unable to reload Apache!

A simple
  systemctl reload apache2
does exactly what
  apache2ctl graceful
used to do for decades, and it is reflected in Apache's error.log accordingly:

[Wed Oct 13 13:23:23.248679 2021] [mpm_event:notice] [pid 20482:tid 140060367948864] AH00493: SIGUSR1 received. Doing graceful restart
Wed Oct 13 13:23:23.295354 2021] [mpm_event:notice] [pid 20482:tid 140060367948864] AH00489: Apache/2.4.41 (Ubuntu) mod_jk/1.2.46 OpenSSL/1.1.1f configured -- resuming normal operations

I also have verified that the PID of Apache's main process stays the same and only it's child processes are new.

All done on Ubuntu 20.04 which currently would do an apache restart for "graceful" by mistake.

So PLEASE, if you insinst on rerouting apache2ctl graceful to systemd make it reload and not restart Apache.

Thanks, regards, Christoph Lechleitner