1

We have deployed a PHP application to an Ubuntu 12.10 server running PHP 5.4.6

When restarting Apache and monitoring via top, an Apache process will spawn and start consuming 100% of CPU and never die. A few minutes later, another similar Apache process will spawn, consume 100% of CPU and not die. Below is an example.

9766 www-data  20   0  697m 384m  22m R  99,7  2,4  10:15.66 apache2

I then changed the Apache LogFormat, to also log the process ID (9766 in this case).

But in the AccessLog, no process with 9766 exists! Only the ones that spawn and die the way they should.

Anyone have any ideas on how to debug this and get more information about this process ID? Specifically, I would ideally want to know what page Apache called that spawned that process ID.

This issue only happens on the liver server, which I have upgraded from 12.04 LTS to 12.10 (but the same issue persists).

Hagen
  • 21
  • 3
  • This may be useful to replay your production logs to your testing environment http://serverfault.com/questions/84041/how-can-i-replay-apache-access-logs-back-at-my-servers-to-do-real-world-load-tes – user9517 Feb 13 '14 at 08:56
  • Thanks Ian, not sure that will help though, because the rouge Apache process isn't in any of my production logs – Hagen Feb 13 '14 at 09:17
  • I think you've missed the point or not explained something very well but hey – user9517 Feb 13 '14 at 09:19
  • Sorry, will take a closer look. My brain is completely fried at this stage. – Hagen Feb 13 '14 at 09:19

1 Answers1

1

The solution was to install and inspect using Mod Status.

The issue was that I could not find the GET request to the rouge PID in the apache access logs.

Mod Status however (http://httpd.apache.org/docs/2.2/mod/mod_status.html), DID give me the GET request to the rouge PID.

Hagen
  • 21
  • 3