CPU Spike
Using htop command, I could see it is the php running as the SuEXEC user using very high CPU.
Restarting Apache2 didn't seem to help.
Is there a way I can figure out what php is actually doing?
Thanks.
Max
9 Replies
The number of site visitors didn't change much and I haven't changed anything on the system.
Any ideas on how to find out the cause? I can see it is php that is consuming a lot resources but not sure why.
Thanks.
@OZ:
Where's my crystal ball …
Behind the fridge, things are almost always behind the fridge when you can't find them.
picmax: Check your apache access logs it'll let you know what pages are being accessed then you can check those scripts for resource intensive things.
There was no changes made to it and there isn't anything special I can see in the access log. It will be helpful If I can let php tell me what it is doing …
@obs:
@OZ:Where's my crystal ball …
Behind the fridge, things are almost always behind the fridge when you can't find them.
picmax: Check your apache access logs it'll let you know what pages are being accessed then you can check those scripts for resource intensive things.
@obs:
picmax: Check your apache access logs it'll let you know what pages are being accessed then you can check those scripts for resource intensive things.
^^ that.
I've noticed CPU spikes on my wordpress installations as well; in those cases, the problem was that some misbehaved spider was trolling the site, using strange URL parameters in the query string that would bypass my caching. Found them in my apache access logs.
Again it all makes sense if this has happened earlier. My server has been running fine and the problem started suddenly without any changes made to it 2PM in the afternoon.
No traffic surge, etc, either.
I have reinstalled Wordpress. No difference.
Are you sure you're looking at the right access logs? Virtual hosts often have their logs split one per host.
A little bit after 8PM local time, the linode appears to have find its peace. Just like when it started, it ended with no reason.
I will keep an eye on it over the night.
Thanks.
@obs:
Well clearly something has happened or you wouldn't be getting more cpu usage.
Are you sure you're looking at the right access logs? Virtual hosts often have their logs split one per host.