Linux – why apache2 process is eating so much CPU

apache-2.2linux

This is my top output print.
enter image description here

Basically my site hangs on and the server needs to be restarted once at 4-5 hours…I supposed that mysql is the issue so I disabled some hard queries but I still see problems on apache…

Is there a way to find out why my apache process is eating so much cpu?

Best Answer

Try using http://httpd.apache.org/docs/2.0/mod/mod_status.html and/or looking into the server logs and see what script is executing. I'm assuming its a script that entered an infine loop somehow