0

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?

Thomas
  • 211
  • 1
  • 2
  • 5

2 Answers2

1

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

Derek Downey
  • 3,765
  • 4
  • 25
  • 29
0

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)

symcbean
  • 19,931
  • 1
  • 29
  • 49