Apache httpd SIGTERM Every 5 - 30 Minutes

PPNSteve

Well-Known Member
Mar 13, 2003
413
3
168
Somewhere in Ilex Forest
cPanel Access Level
Root Administrator
Twitter
If I understand this correctly, Apache running on cPanel will do a graceful restart every 10 mins or so yet I'm not seeing this behavior.

I am seeing Apache catching a SIGTERM at what appears to be random times and doing a hard restart.

Code:
[Sun Jul 01 19:34:48 2012] [error] [client 196.217.xx.xx] File does not exist: {redacted}/public_html/customavatars/avatar22214_1.gif, referer: http://{redacted}/showthread.php?t=81233
[Sun Jul 01 19:34:55 2012] [notice] caught SIGTERM, shutting down
[Sun Jul 01 19:34:57 2012] [warn] RSA server certificate CommonName (CN) `{redacted}' does NOT match server name!?
[Sun Jul 01 19:34:57 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jul 01 19:34:57 2012] [warn] RSA server certificate CommonName (CN) `{redacted}' does NOT match server name!?
[Sun Jul 01 19:34:57 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Sun Jul 01 19:34:57 2012] [notice] ModSecurity for Apache/2.6.6 (http://www.modsecurity.org/) configured.
[Sun Jul 01 19:34:57 2012] [notice] ModSecurity: APR compiled version="1.4.5"; loaded version="1.4.5"
[Sun Jul 01 19:34:57 2012] [notice] ModSecurity: PCRE compiled version="8.21"; loaded version="8.21 2011-12-12"
[Sun Jul 01 19:34:57 2012] [notice] ModSecurity: LUA compiled version="Lua 5.1"
[Sun Jul 01 19:34:57 2012] [notice] ModSecurity: LIBXML compiled version="2.7.8"
[Sun Jul 01 19:34:58 2012] [warn] RSA server certificate CommonName (CN) `{redacted}' does NOT match server name!?
[Sun Jul 01 19:34:58 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jul 01 19:34:58 2012] [warn] RSA server certificate CommonName (CN) `{redacted}' does NOT match server name!?
[Sun Jul 01 19:34:58 2012] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 PHP/5.3.13 configured -- resuming normal operations
Code:
Current Time: Sunday, 01-Jul-2012 19:35:04 GMT
Restart Time: Sunday, 01-Jul-2012 19:34:58 GMT
Parent Server Generation: 0
Server uptime: 6 seconds
Total accesses: 55 - Total Traffic: 3.2 MB
CPU Usage: u5.81 s.36 cu0 cs0 - 103% CPU load
9.17 requests/sec - 0.5 MB/second - 60.4 kB/request
19 requests currently being processed, 14 idle workers
IMO, there is something wrong here.

Suggestions? Ideas??
 

PPNSteve

Well-Known Member
Mar 13, 2003
413
3
168
Somewhere in Ilex Forest
cPanel Access Level
Root Administrator
Twitter
My other servers do not do this restart thing either:

Code:
Apache server status for svr3.1-gb.net

Server Version: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 PHP/5.3.8
Server Built: Jan 13 2012 18:56:42

Current Time: Monday, 02-Jul-2012 21:33:42 GMT
Restart Time: Tuesday, 19-Jun-2012 19:33:57 GMT
Parent Server Generation: 0
Server uptime: 13 days 1 hour 59 minutes 44 seconds
Total accesses: 17847528 - Total Traffic: 11.7 GB
CPU Usage: u18.92 s4.1 cu1.6 cs0 - .00218% CPU load
or
Code:
Apache server status for suikoden.justpushstart.com

Server Version: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 PHP/5.3.8
Server Built: Nov 14 2011 03:39:30

Current Time: Monday, 02-Jul-2012 14:34:48 PDT
Restart Time: Wednesday, 06-Jun-2012 00:49:17 PDT
Parent Server Generation: 351
Server uptime: 26 days 13 hours 45 minutes 31 seconds
Total accesses: 48113641 - Total Traffic: 632.5 GB
CPU Usage: u251.16 s11.87 cu.05 cs0 - .0115% CPU load
but this one with a freshly rebuilt Apache / php does:
Code:
Apache server status for svr2.1-gb.net

Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 PHP/5.3.13
Server Built: Jun 30 2012 21:17:54

Current Time: Monday, 02-Jul-2012 21:32:09 GMT
Restart Time: Monday, 02-Jul-2012 21:31:55 GMT
Parent Server Generation: 0
Server uptime: 14 seconds
Total accesses: 207 - Total Traffic: 9.1 MB
CPU Usage: u13.6 s.89 cu.02 cs0 - 104% CPU load
Can anyone offer any suggestions, ideas or thoughts on this?
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello Steve,

Could you check /var/log/messages for the same time period to see if you are showing any reason for this happening? Oftentimes, memory allocation issues or segfaults can show up in /var/log/messages when a service is having a forced shutdown. /var/log/messages is where such messages are logged.

Thanks!
 

PPNSteve

Well-Known Member
Mar 13, 2003
413
3
168
Somewhere in Ilex Forest
cPanel Access Level
Root Administrator
Twitter
Thanks for the reply Tristan.

I'm not seeing any errors in /var/log/messages that correspond with the Apache restarts..

in fact, except for these restarts and another issue I'm having with mod_cloudflare, Apache is quite fast and working well enough. Its just at times this forced restart jumps up server load and tends to drop in-progress page loads.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
You could open up a ticket for us to check it, but we'll probably require cloudflare to be disabled while we do. We don't support mod_cloudflare on a machine as it isn't part of EasyApache. Tickets can be opened using WHM > Support Center > Contact cPanel or using the link in my signature. Thanks!