The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache restarts every 10 mins

Discussion in 'EasyApache' started by billau, Jul 29, 2004.

  1. billau

    billau Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brisbane, Australia
    Solution

    modify cpanellogd under /usr/local/cpanel/cpanellogd

    It's the Perl script cpanellogd running as a daemon that's causing the 10 minute reboot. I've modified my cpanellogd to only do this once per day so I still get log processing and bandwidth limiting.

    Replace this line
    sleep(300);
    with
    sleep(43200);

    43200 seconds (12 hours) instead of 300 seconds (5 minutes). Since the script only processes logs every other loop, this will mean log processing only happens once every 24 hours.

    If you want to run phpaccelerator, replace all instances of
    system("killall -USR1 httpd");
    with
    system("/etc/rc.d/init.d/httpd stop");
    sleep(20);
    system("/etc/rc.d/init.d/httpd start");

    The above will guarantee that your server does a hard restart. In case the httpd start command does not work, chkserv will still restart the server.

    Orginal posting cpanel forums

    http://forums.cpanel.net/read.php?TID=4806&page=4
    http://forums.cpanel.net/read.php?TID=3402&page=10
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    But what are the implications of changing it from reloading every 10 minutes (it reloads, not restarts)? I understood there was a good reason for it to perform a reload.
     
Loading...

Share This Page