Hello all, Over the last two months, our Apache server has crashed twice. Our server company says that nothing is wrong with the server, but believe that a runaway PHP script is causing the issue. Normally, I take them at their word, but recently they have been attempting to sell us a new server package. My question for the group is: Are there any other causes for Apache-server crashing in the method that it does for us? Any help is appreciated.
hi. allow me to use your thread. i am using cpanel. where was supposed to be log files? All i can see is empty logs on /var/log/httpd should that be it? or ill cpanel log them somewhere elese? Best Regards
for apache error log you can take a look it on /usr/local/apache/logs/error_log for access log at /usr/local/apache/logs/access_log for suexec log at /usr/local/apache/logs/suexec_log anything more ?
i can provide you guys with a emergency-system for apache, which restarts apache in case it crashes,hangs,takes forever... PM me.
Band-aid is good for temporary fix, but you should analyze the exact reason behind the apache crash and fix it. If you need free assistance regarding this, please contact us via MSN/Yahoo (given here) and we can assist you further.
Are you using the worker or prefork mpm? some php extensions are not thread safe and can cause this. What is your config value for maxrequestsperchild? For stability with php applications I recommend prefork mpm. What maxrequestsperchild (with preforkm mpm) does is recycle an apache process after a certain amount of requests to ensure memory leakage doesn't get out of hand. Some may argue that this burden's apache but from I have found recycling the processes instead of letting them run indefinitely leads to more stability. Some people have maxrequestsperchild set to 0 but I tend to have it set to 1000-2000 on my servers. The apache docs are great if you need a detailed explanation.
its a script i wrote for my own personal use. i am willing to give it away and adapt it to your needs, sure not for free - it´s digitalpoint in my case the reason was too much traffic on a too weak system. the crash fix would either be a better server or running my little workaround script. ofcourse i chose the latter, as my site is not mission-critical but hightraffic.