Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Apache not restarting auto

Discussion in 'EasyApache' started by web12, Jan 18, 2003.

  1. web12

    web12 Well-Known Member

    Nov 20, 2002
    Likes Received:
    Trophy Points:

    Got a funny problem here... Apache keeps going out on one of my servers during the night, with no explanation. All that is needed each time is to restart Apache, but surely it should be doing this itself?

    Woke up this morning to a few angry emails, but i can not find the problem.

    Anyone got any suggestions please?
  2. scottaxa

    scottaxa Member

    Jul 9, 2002
    Likes Received:
    Trophy Points:
    yeap, i have this too. there seems to be no pattern. i do a manual restart and it works fine, the problem is i need to sleep so can't be here to do it all day lol

  3. nitromax

    nitromax Well-Known Member

    Feb 12, 2002
    Likes Received:
    Trophy Points:
    Sounds to me like your chkservd program is not running, and if it is you may not have the file setup to restart apache if chkservd finds that it's down.

    1) SSH into root and do this:

    ps -aux

    Look under the COMMAND heading for the word &chkservd&. If you don't see that in there then it may not be running. You can also do this:

    /etc/rc.d/init.d/chkservd status

    If it's not running then do this:

    /etc/rc.d/init.d/chkservd start

    Now check to see if you have the necessary file to restart apache automatically if it fails... Go to the following directory on your server:

    cd /etc/chkserv.d

    That directory has files in it that chkservd uses to check the various services that are supposed to be up and running. You should see a file in there named &apache&. If you don't see one that could be the problem. If you don't have it then do this:

    vi apache

    Once inside the new file insert the following:

    service[apache]=80,GET / HTTP/1.0,HTTP/1..,/scripts/checkmaxclients;killall -TERM httpd;sleep 2;killall -9 httpd;/etc/rc.d/init.d/httpd stop;/etc/rc.d/init.d/httpd start;/usr/local/apache/bin/apachectl start

    I'm not an expert at this stuff, but I had numerous problems with chkservd early on. My problem was, and still is, that chkservd stops running for some unknown reason. When the checking program stops and services go down they are not restarted. I finally created a little script that checks the status of chkservd and restarts it if it's down.

    Hope that will help.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice