As we are wrapping up development on a major plugin written in PHP, we are finding sometimes loading the page will result in near 100% CPU usage. I need to resolve this, but can not determine where the resource usage is coming from.
The page fully loads and no new requests are made on page load. Yet the CPU usage remains high. I can not find the pattern of what causes the spike.
I am running Apache 2.4.27 and PHP 5.6.31. I am loading status_module modules/mod_status.so
and have ExtendedStatus on
, but I don't think Extended Status is doing anything.
Windows 10 running WAMP is the environment, so I don't have real shell commands. I do have git bash installed so there's a little bit to work with.
When I visit localhost/server-status
, it does not display any useful information (rather, just the recent requests that have been made). What I need to know instead is what particular request or process is consuming so much CPU.
Is there a way to determine which file, function, or request triggers the spike?