So I'm checking the questing status, trying to understand where we are
there.
First, the basics.
apache2ctl situation:
apache2ctl:
restart|graceful)
if $HTTPD ${APACHE_ARGUMENTS} -t 2> /dev/null ; then
$HTTPD ${APACHE_ARGUMENTS} -k "$ARGV"
else
$HTTPD ${APACHE_ARGUMENTS} -t
fi
ERROR=$?
;;
systemd unit situation:
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl graceful-stop
ExecReload=/usr/sbin/apachectl graceful
So let's check reload via systemctl and apache2ctl.
a) systemctl reload apache2
Calls: apachectl graceful -> calls apache2 -k graceful
Sends SIGUSR1:
[Fri Mar 27 17:28:43.126219 2026] [mpm_event:notice] [pid 2980:tid 2980]
AH00493: SIGUSR1 received. Doing graceful restart
Children PID change, but not parent:
root@q-apachectl:~# pidof apache2
3370 3369 2980
root@q-apachectl:~# systemctl reload apache2
root@q-apachectl:~# pidof apache2
3468 3467 2980
systemd still considers apache2 active and running and tracking the correct
PIDs:
root@q-apachectl:~# systemctl is-active apache2
active
root@q-apachectl:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset:
enabled)
Active: active (running) since Fri 2026-03-27 17:28:02 UTC; 9min ago
Invocation: 84f1e17032b64b07863605d591ca46d3
Docs: https://httpd.apache.org/docs/2.4/
Process: 2977 ExecStart=/usr/sbin/apachectl start (code=exited,
status=0/SUCCESS)
Process: 3463 ExecReload=/usr/sbin/apachectl graceful (code=exited,
status=0/SUCCESS)
Main PID: 2980 (apache2)
Tasks: 55 (limit: 9242)
Memory: 4.9M (peak: 7.6M)
CPU: 353ms
CGroup: /system.slice/apache2.service
├─2980 /usr/sbin/apache2 -k start
├─3467 /usr/sbin/apache2 -k start
└─3468 /usr/sbin/apache2 -k start
b) apache2ctl graceful
Calls apache2 -k graceful
Sends SIGUSR1:
[Fri Mar 27 17:35:12.654694 2026] [mpm_event:notice] [pid 2980:tid 2980]
AH00493: SIGUSR1 received. Doing graceful restart
Children PID change, but not parent:
root@q-apachectl:~# pidof apache2
3268 3267 2980
root@q-apachectl:~# apache2ctl graceful
root@q-apachectl:~# pidof apache2
3370 3369 2980
systemd still considers apache2 active and running and tracking the correct
PIDs:
root@q-apachectl:~# systemctl is-active apache2
active
root@q-apachectl:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset:
enabled)
Active: active (running) since Fri 2026-03-27 17:28:02 UTC; 7min ago
Invocation: 84f1e17032b64b07863605d591ca46d3
Docs: https://httpd.apache.org/docs/2.4/
Process: 2977 ExecStart=/usr/sbin/apachectl start (code=exited,
status=0/SUCCESS)
Process: 3167 ExecReload=/usr/sbin/apachectl graceful (code=exited,
status=0/SUCCESS)
Main PID: 2980 (apache2)
Tasks: 55 (limit: 9242)
Memory: 4.8M (peak: 7.6M)
CPU: 269ms
CGroup: /system.slice/apache2.service
├─2980 /usr/sbin/apache2 -k start
├─3369 /usr/sbin/apache2 -k start
└─3370 /usr/sbin/apache2 -k start
So, right now, with 2.4.64-1ubuntu3.3 in questing, it looks like
graceful is being handled correctly, and we don't want to regress that.
Note that I haven't talked about this current bug yet. That comes next,
to avoid having a comment too large for LP to display.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1832182
Title:
systemd unable to detect running apache if invoked via "apache2ctl
graceful"
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1832182/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs