Apache randomly timing out

I've been wrestling with this problem for few days now.

Apache works fine. Then suddenly starts timing out.

There is nothing in the error log.

Few more things: - I've gone so far as to reinstall the box. - The codebase has not been touched in months. - I've done the speech test so I know it's not a bandwidth overload problem - Restart apache does not necessarily fix the issue, even temporarily (only thing that does is random attempts)

If you can guide me to tools that can help me figure this out or if you know any specifics I should see, appreciate it.


Solution 1:

I'm guessing you're on Linux. Can you give the Apache and kernel version as well as architecture? Also, in httpd.conf turn LogLevel to Debug, start Apache with -e Debug, and provide netstat -tupan , sar -q 1 10 and ps -aux output the next time things time out and you're ready to restart?

Can you let us know what MPM you're using as well? Ie, prefork, hybrid, worker.

Solution 2:

Did you check dmesg infomaration ?

I have same problem - apache just hangs, with no reason... I use M/Monit to control if httpd process is alive, and restart when there is no connection.