Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running apache2 with mod-fcgid, suexec and SysCP. From time to time, the apache process gets stuck using 100% CPU on one core on my server. The apache is also unable to handle any additional requests in this state. I need to kill -9 the process manually in these situations. Since it's the apache2 process under its global user crashing, and not a fcgid with an project-specific user id, I can't even see, which code is causing the crash. What would be a good strategy to nail the cause of this behavior?

share|improve this question
add comment

2 Answers

If you have access to apache httpd.conf, you can enable and configure mod_status with your IP and when the process starts taking the cpu, load up the page and search for processID

share|improve this answer
add comment

What OS is it running on? If its Linux/BSD...

Use gdb (or gcore) to find out where its getting stuck. (take a note of the pid which is hogging the cpu before grabbing the core file)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.