Thanks to a vise sysadmin who postet a informativ message I have done as follow on all servers (almost yet)
Simply told apache on cpanel boxes need to be shut down and startet again, to avoid it will crash. Somehow it grows and grows at time beeing , and a apachectl graceful will not reset apache. It is relatet to a bug in Zend but can effect any server. It is supose to be relatet to the fact that apache is being done a graceful restart evry 10 min on WHM boxes, but this is not why but a simple how to fix.
Make a script:
cd /usr/bin
touch apacherestart
chmod 700 apacherestart
vi apacherestart
press i to enter edit mode in vi
add this
#!/bin/bash
/usr/local/apache/bin/apachectl stop
sleep 3
rm -f /usr/local/apache/logs/httpd.pid
/usr/local/apache/bin/apachectl start
press escape and :wq to exit edit mode, save and exit vi.
cd /etc
vi crontab (this crontab cpanel never touches and it will work)
Go to end of file,
press i to enter vi edit mode
add this line:
30 4 * * * root /usr/bin/apacherestart
press escape and :wq to exit vi edit mode and write exit vi.
You could from /etc say
cat crontab
Check you have written the path correct.
Now you have installed a root cron job wich will shut down apache, remove the pid file and start apace again, eavh night at 0430.
You shuld now be able to expect apche on cpanel boxes don't get hung because of file desriptors. As far as I can understand, this shuld be done on all cpanel boxes, as it is working now.
Anyone disgree please enlighten me. But 5 seks at 0430 is better then 30 min at lunch time!
Hopes this will help someone!



LinkBack URL
About LinkBacks
Reply With Quote




