I have the occasional HTTPD request on my web server that spikes CPU usage. I'm watching this in Top. Every URL is dynamically generated each time it's requested. The framework is Codeigniter. I'm using prefork Apache as my web server on Linux CentOS.
How can I figure out which URL is being processed when the CPU usage is spiking? Can I associate the Process ID with the HTTP request in the Apache logs somehow? There are millions of pages on the site, so looking at Codeignitor's profiler doesn't help.
You could add the PID to your log (see http://httpd.apache.org/docs/current/mod/mod_log_config.html -- %P).
Or you could activate mod_status - that gives you a fairly useful live display with the most recent URL by that child.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With