Nicola Urbinati
Basic Pleskian
We're experiencing a lot of random Apache restarts, like once a day.
What's going on?
What's going on?
It may be that the log rotation is set up to rotate when a given size is reached, which can be random lengths of time depending on server traffic. When the apache logs are rotated and archived, it restarts to re-initialize the new empty log files. You should be able to see the times logs were rotated in the logs, and compare to see if the random restarts coincide with that timing to verify.We're experiencing a lot of random Apache restarts, like once a day.
What's going on?
# grep resuming /var/log/apache2/error.log
[Fri Nov 27 13:20:13.630134 2020] [mpm_event:notice] [pid 17687:tid 140465329728448] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 13:25:12.827971 2020] [mpm_event:notice] [pid 19705:tid 139702004890560] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 13:30:12.697888 2020] [mpm_event:notice] [pid 21413:tid 139841244543936] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 13:35:16.743154 2020] [mpm_event:notice] [pid 23164:tid 139956536921024] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 13:40:16.019062 2020] [mpm_event:notice] [pid 25006:tid 139943726578624] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 13:45:14.406098 2020] [mpm_event:notice] [pid 26820:tid 140599530253248] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 13:50:14.257489 2020] [mpm_event:notice] [pid 28498:tid 140056077114304] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 13:55:13.337247 2020] [mpm_event:notice] [pid 30261:tid 140295014218688] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 14:00:14.099973 2020] [mpm_event:notice] [pid 32029:tid 140329832569792] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 14:05:12.982764 2020] [mpm_event:notice] [pid 1487:tid 140478582430656] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 14:10:13.069545 2020] [mpm_event:notice] [pid 3259:tid 140259874917312] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 14:15:13.558304 2020] [mpm_event:notice] [pid 4993:tid 140616797019072] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 14:20:14.414735 2020] [mpm_event:notice] [pid 6836:tid 139669036268480] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
root@srvurb01:/var/log/apache2# service apache2 status
● apache2.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf, limit_nofile.conf
Active: active (running) since Fri 2020-11-27 14:25:12 CET; 2min 48s ago
Process: 8580 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
Process: 8615 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 22094 (code=exited, status=0/SUCCESS)
Tasks: 68 (limit: 4915)
CGroup: /system.slice/apache2.service
├─8640 /usr/sbin/apache2 -k start
├─8642 /opt/psa/admin/sbin/pipelog 7081
├─8644 /usr/sbin/apache2 -k start
├─8646 /usr/sbin/apache2 -k start
├─8647 /usr/sbin/apache2 -k start
└─9358 /opt/plesk/php/7.3/bin/php-cgi -c /etc/psa-webmail/roundcube/php.ini
Nov 27 14:25:11 srvurb01.urbaman.it systemd[1]: Starting The Apache HTTP Server...
Nov 27 14:25:12 srvurb01.urbaman.it systemd[1]: Started The Apache HTTP Server.
-----------------------------------------------------
root@srvurb01:/var/log/apache2# service apache2 status
● apache2.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf, limit_nofile.conf
Active: active (running) since Fri 2020-11-27 14:50:13 CET; 4s ago
Process: 17323 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
Process: 17412 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 22094 (code=exited, status=0/SUCCESS)
Tasks: 57 (limit: 4915)
CGroup: /system.slice/apache2.service
├─17449 /usr/sbin/apache2 -k start
├─17451 /opt/psa/admin/sbin/pipelog 7081
├─17453 /usr/sbin/apache2 -k start
├─17455 /usr/sbin/apache2 -k start
└─17456 /usr/sbin/apache2 -k start
Nov 27 14:50:12 srvurb01.urbaman.it systemd[1]: Starting The Apache HTTP Server...
Nov 27 14:50:13 srvurb01.urbaman.it systemd[1]: Started The Apache HTTP Server.
Nov 27 15:20:11 srvurb01 systemd[1]: Stopped The Apache HTTP Server.
Nov 27 15:20:11 srvurb01 systemd[1]: Starting The Apache HTTP Server...
Nov 27 15:20:11 srvurb01 systemd[1]: Started The Apache HTTP Server.
Nov 27 15:24:58 srvurb01 monit[819]: 'apache' process PID changed to 30630
Nov 27 15:25:12 srvurb01 systemd[1]: Stopped The Apache HTTP Server.
Nov 27 15:25:12 srvurb01 systemd[1]: Starting The Apache HTTP Server...
Nov 27 15:25:12 srvurb01 systemd[1]: Started The Apache HTTP Server.
Nov 27 15:30:00 srvurb01 monit[819]: 'apache' process PID changed to 32336
Nov 27 15:30:12 srvurb01 systemd[1]: Stopped The Apache HTTP Server.
Nov 27 15:30:12 srvurb01 systemd[1]: Starting The Apache HTTP Server...
Nov 27 15:30:12 srvurb01 systemd[1]: Started The Apache HTTP Server.
Nov 27 15:50:09 srvurb01 monit[819]: 'apache' process PID changed to 6875
Nov 27 15:50:12 srvurb01 monit[819]: GENERIC: error receiving data -- Connection reset by peer
Nov 27 15:50:12 srvurb01 monit[819]: 'apache' failed protocol test [generic] at INET[127.0.0.1:7080].
Nov 27 15:50:12 srvurb01 monit[819]: 'apache' trying to restart
Nov 27 15:50:12 srvurb01 monit[819]: 'apache' start: /opt/psa/admin/bin/websrvmng
Nov 27 15:50:12 srvurb01 systemd[1]: Stopped The Apache HTTP Server.
Nov 27 15:50:12 srvurb01 systemd[1]: Starting The Apache HTTP Server...
Nov 27 15:50:12 srvurb01 systemd[1]: Started The Apache HTTP Server.
Nov 27 15:50:13 srvurb01 wdcollect[22277]: Connection to server has been established.
Nov 27 15:50:13 srvurb01 wdcollect[22277]: Connection to server has been established.
Nov 27 15:51:14 srvurb01 wdcollect[22277]: Connection to SMTP server has been closed.
Nov 27 15:51:14 srvurb01 wdcollect[22277]: Connection to SMTP server has been closed.
Nov 27 15:55:12 srvurb01 systemd[1]: Stopped The Apache HTTP Server.
Nov 27 15:55:12 srvurb01 systemd[1]: Starting The Apache HTTP Server...
Nov 27 15:55:13 srvurb01 systemd[1]: Started The Apache HTTP Server.
Nov 27 15:55:14 srvurb01 monit[819]: 'apache' connection passed
Nov 27 15:55:15 srvurb01 wdcollect[22277]: Connection to server has been established.
Nov 27 15:55:15 srvurb01 wdcollect[22277]: Connection to server has been established.
Nov 27 15:56:16 srvurb01 wdcollect[22277]: Connection to SMTP server has been closed.
Nov 27 15:56:16 srvurb01 wdcollect[22277]: Connection to SMTP server has been closed.
[Fri Nov 27 15:45:12.926195 2020] [core:notice] [pid 6875:tid 140377770978240] AH00094: Command line: '/usr/sbin/apache2'
[Fri Nov 27 15:50:12.085913 2020] [mpm_event:notice] [pid 6875:tid 140377770978240] AH00491: caught SIGTERM, shutting down
[Fri Nov 27 15:50:12.442347 2020] [ssl:warn] [pid 8571:tid 139830551804864] AH01909: webmail.gdrunplugged.it:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:50:12.448090 2020] [ssl:warn] [pid 8571:tid 139830551804864] AH01909: lists:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:50:12.449340 2020] [ssl:warn] [pid 8571:tid 139830551804864] AH01909: default-207_180_243_98:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:50:12.449613 2020] [:notice] [pid 8571:tid 139830551804864] ModSecurity for Apache/2.9.3 (http://www.modsecurity.org/) configured.
[Fri Nov 27 15:50:12.449627 2020] [:notice] [pid 8571:tid 139830551804864] ModSecurity: APR compiled version="1.6.3"; loaded version="1.6.3"
[Fri Nov 27 15:50:12.449633 2020] [:notice] [pid 8571:tid 139830551804864] ModSecurity: PCRE compiled version="8.39 "; loaded version="8.39 2016-06-14"
[Fri Nov 27 15:50:12.449638 2020] [:notice] [pid 8571:tid 139830551804864] ModSecurity: LUA compiled version="Lua 5.1"
[Fri Nov 27 15:50:12.449642 2020] [:notice] [pid 8571:tid 139830551804864] ModSecurity: LIBXML compiled version="2.9.4"
[Fri Nov 27 15:50:12.449646 2020] [:notice] [pid 8571:tid 139830551804864] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Fri Nov 27 15:50:12.726731 2020] [suexec:notice] [pid 8571:tid 139830551804864] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Fri Nov 27 15:50:12.965558 2020] [:notice] [pid 8648:tid 139830551804864] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Fri Nov 27 15:50:12.965589 2020] [:notice] [pid 8648:tid 139830551804864] mod_bw : Version 0.92 - Initialized [0 Confs]
[Fri Nov 27 15:50:12.986611 2020] [ssl:warn] [pid 8648:tid 139830551804864] AH01909: webmail.gdrunplugged.it:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:50:12.991256 2020] [ssl:warn] [pid 8648:tid 139830551804864] AH01909: lists:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:50:12.992240 2020] [ssl:warn] [pid 8648:tid 139830551804864] AH01909: default-207_180_243_98:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:50:13.316603 2020] [mpm_event:notice] [pid 8648:tid 139830551804864] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 15:50:13.316683 2020] [core:notice] [pid 8648:tid 139830551804864] AH00094: Command line: '/usr/sbin/apache2'
[Fri Nov 27 15:55:12.346056 2020] [mpm_event:notice] [pid 8648:tid 139830551804864] AH00491: caught SIGTERM, shutting down
[Fri Nov 27 15:55:12.751165 2020] [ssl:warn] [pid 10366:tid 140024880257984] AH01909: webmail.gdrunplugged.it:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:55:12.756111 2020] [ssl:warn] [pid 10366:tid 140024880257984] AH01909: lists:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:55:12.757263 2020] [ssl:warn] [pid 10366:tid 140024880257984] AH01909: default-207_180_243_98:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:55:12.757593 2020] [:notice] [pid 10366:tid 140024880257984] ModSecurity for Apache/2.9.3 (http://www.modsecurity.org/) configured.
[Fri Nov 27 15:55:12.757611 2020] [:notice] [pid 10366:tid 140024880257984] ModSecurity: APR compiled version="1.6.3"; loaded version="1.6.3"
[Fri Nov 27 15:55:12.757620 2020] [:notice] [pid 10366:tid 140024880257984] ModSecurity: PCRE compiled version="8.39 "; loaded version="8.39 2016-06-14"
[Fri Nov 27 15:55:12.757628 2020] [:notice] [pid 10366:tid 140024880257984] ModSecurity: LUA compiled version="Lua 5.1"
[Fri Nov 27 15:55:12.757634 2020] [:notice] [pid 10366:tid 140024880257984] ModSecurity: LIBXML compiled version="2.9.4"
[Fri Nov 27 15:55:12.757640 2020] [:notice] [pid 10366:tid 140024880257984] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Fri Nov 27 15:55:13.179391 2020] [suexec:notice] [pid 10366:tid 140024880257984] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Fri Nov 27 15:55:13.374126 2020] [:notice] [pid 10381:tid 140024880257984] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Fri Nov 27 15:55:13.374174 2020] [:notice] [pid 10381:tid 140024880257984] mod_bw : Version 0.92 - Initialized [0 Confs]
[Fri Nov 27 15:55:13.398196 2020] [ssl:warn] [pid 10381:tid 140024880257984] AH01909: webmail.gdrunplugged.it:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:55:13.403786 2020] [ssl:warn] [pid 10381:tid 140024880257984] AH01909: lists:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:55:13.404629 2020] [ssl:warn] [pid 10381:tid 140024880257984] AH01909: default-207_180_243_98:443:0 server certificate does NOT include an ID which matches the server name
[Fri Nov 27 15:55:13.693355 2020] [mpm_event:notice] [pid 10381:tid 140024880257984] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Nov 27 15:55:13.693472 2020] [core:notice] [pid 10381:tid 140024880257984] AH00094: Command line: '/usr/sbin/apache2'
If this causes Apache to restart every 10 or 15 minutes, I would still be concerned with whatever is changing your settings so often as to cause Plesk to think it needs to restart every 5 minutes.Put 600 as apache restart interval, let's see if it mitigates or solves the issue.