Description of problem: logrotate is set to run daily. At 04:02h on most days the server restarts normally, like: [Sat Oct 01 04:02:03.100993 2022] [mpm_prefork:notice] [pid 1411] AH00171: Graceful restart requested, doing restart [Sat Oct 01 04:02:05.697565 2022] [mpm_prefork:notice] [pid 1411] AH00163: Apache/2.4.54 (Unix) OpenSSL/1.1.1q PHP/8.0.23 mod_perl/2.0.10 Perl/v5.32.1 configured -- resuming normal operations [Sat Oct 01 04:02:05.697612 2022] [core:notice] [pid 1411] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' However around twice a week on random days it fails to re-start with: [Sun Oct 02 04:02:02.442675 2022] [mpm_prefork:notice] [pid 1411] AH00171: Graceful restart requested, doing restart httpd: Syntax error on line 54 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/modules.d/70_mod_php.conf: Cannot load modules/mod_php.so into server: /etc/httpd/modules/mod_php.so: cannot allocate memory in static TLS block Restarting httpd later in the day shows: [Sun Oct 02 10:35:17.304602 2022] [core:warn] [pid 1773416] AH00098: pid file /run/httpd/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Sun Oct 02 10:35:17.312408 2022] [mpm_prefork:notice] [pid 1773416] AH00163: Apache/2.4.54 (Unix) OpenSSL/1.1.1q PHP/8.0.23 mod_perl/2.0.10 Perl/v5.32.1 configured -- resuming normal operations [Sun Oct 02 10:35:17.312465 2022] [core:notice] [pid 1773416] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' Any ideas for debugging this?
(In reply to Barry Jackson from comment #0) > > [Sun Oct 02 04:02:02.442675 2022] [mpm_prefork:notice] [pid 1411] AH00171: > Graceful restart requested, doing restart > httpd: Syntax error on line 54 of /etc/httpd/conf/httpd.conf: Syntax error > on line 1 of /etc/httpd/conf/modules.d/70_mod_php.conf: Cannot load > modules/mod_php.so into server: /etc/httpd/modules/mod_php.so: cannot > allocate memory in static TLS block > I'd say this it the one that kills your restart. So that would be related to: https://bugs.php.net/bug.php?id=80814 https://bz.apache.org/bugzilla/show_bug.cgi?id=65918
Thanks Thomas, I did not find those when I searched. Obviously an issue way over my head. ;) Will flag as UPSTREAM and keep open. For now I will go back to my workaround of stopping httpd at 03.59 and restarting at 04:01 and keep checking back in those bug reports from time to time.
Severity: normal => majorKeywords: (none) => UPSTREAM
As another workaround you could try: - /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true + /bin/systemctl restart httpd.service > /dev/null 2>/dev/null || true as restarting it might help clearing the used memory slots..
Thanks, Done. I will report back after a week or earlier if it happens again.
Thanks to Barry for the report; and Thomas for dealing with it. Assigning to you since it is already in your hands. > cannot allocate memory in static TLS block Looks unhealthy.
Assignee: bugsquad => tmb
Thanks Thomas, It's been a week now without a problem so 'restart' rather than 'reload' appears to have done the trick. Whether this would be a suitable default is less clear so I will leave it for you and others to decide My thought is that a brief disconnect is better than an apparently random, complete shutdown. Cheers, Barry