httpd status down on cPanel but active on ssh

dortgendizayn

Member
Mar 2, 2013
23
0
51
cPanel Access Level
Root Administrator
Hello,
We discovered our webserver getting high traffic on a plugin of wordpress so when i checked i saw httpd server status is down according to WHM service status, but when i checked on ssh by service httpd status it says running and active. I'm attacing 3 secreenshots of this situation. Also i suspected about php-fpm service, but i couldn't find the command line to check php-fpm on ssh, i can restart php-fpm service on whm but these commands dident work
#service php-fpm status
#service php56-fpm status
#service php71-fpm status

how can i investigate what is problem exactly.
 

Attachments

rpvw

Well-Known Member
Jul 18, 2013
1,101
470
113
UK
cPanel Access Level
Root Administrator
By default, the chkservd driver checks each service every five minutes to determine the service's status.

It sometimes happens that the service has been restarted by the chkservd driver using one of the cPanel restart scripts, located at /usr/local/cpanel/scripts/restartsrv_*, but that tailwatch has not yet seen the running service in the 5 min cycle, so it appears down in the service information page but you can see it running in an SSH shell.

Full details at TailWatch - cPanel Knowledge Base - cPanel Documentation

To restart PHP-FPM the command line USED to be
Code:
/scripts/restartsrv_apache_php_fpm
but I am not sure if that will still work (I don't use FPM ,so I have no way of testing this) and it does not appear on the latest docs page of scripts WHM Scripts - Version 76 Documentation - cPanel Documentation - I would guess it is now set up to restart together with apache or httpdhttps://documentation.cpanel.net/display/76Docs/WHM+Scripts
 
Last edited:

dortgendizayn

Member
Mar 2, 2013
23
0
51
cPanel Access Level
Root Administrator
Hey thank you for your answer, yes i thought about maybe it delayed for status but even httpd service is active i can't reach website at that moment, so when i restarted httpd service i can reach webservice and instantly whm httpd stuatsu change into "up". One time i check i saw almost 200 W status for 250 workers and 50 workers at the G position. So httpd couldn't response requests untill i restart , in this time whm shows http status is down but ssh shows httpd status is up.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,291
313
Houston
Hi @dortgendizayn

Based on what I saw it looked like there was too much activity occurring on the server and chksrvd was unable to connect to apache to get the status.

when i restarted httpd service i can reach webservice and instantly whm httpd stuatsu change into "up"
This occurs because when you restart apache you also drop all the previous connections freeing up the ability to connect to the service.

One time i check i saw almost 200 W status for 250 workers and 50 workers at the G position. So httpd couldn't response requests untill i restart , in this time whm shows http status is down but ssh shows httpd status is up.
This behavior is normal for apache the service isn't working it just can't accept any more connections. If this is normal traffic for you, I'd suggest looking into increasing the server limits for apache at WHM>>Service Configuration>>Apache Configuration>>Global Configuration - I'd wager an almost certainty that you've hit the MaxRequestWorkers on the server.