Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: CPU Spike
PostPosted: Tue Jun 28, 2011 12:09 am 
Offline
Senior Newbie

Joined: Sun Jun 12, 2011 12:20 pm
Posts: 10
Today around 2PM MDT the CPU usage spiked up on my Linode and it had been like that till minutes ago. It only stopped after I reboot the node.

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


Top
   
 Post subject:
PostPosted: Tue Jun 28, 2011 6:56 am 
Offline
Senior Member

Joined: Sat Mar 12, 2011 3:43 am
Posts: 76
Location: Russia
Where's my crystal ball ...


Top
   
 Post subject: It is still going on...
PostPosted: Tue Jun 28, 2011 9:23 am 
Offline
Senior Newbie

Joined: Sun Jun 12, 2011 12:20 pm
Posts: 10
The problem continues...

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.


Top
   
 Post subject:
PostPosted: Tue Jun 28, 2011 9:24 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
OZ wrote:
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.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject: Already did
PostPosted: Tue Jun 28, 2011 9:46 am 
Offline
Senior Newbie

Joined: Sun Jun 12, 2011 12:20 pm
Posts: 10
This is a standard Wordpress installation. It has been running great upto the specific time. CPU average less than 10%.

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 wrote:
OZ wrote:
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.


Top
   
 Post subject:
PostPosted: Tue Jun 28, 2011 11:04 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
The access logs will point to a url which you can point to a script, read the script and it'll tell you what it does...even with wordpress' rewrite rules it's not that hard if your url has /category/<something> then it's showing you a category page so you check the files that display categories, if it's wp-admin/<something> you know it's the admin section etc etc

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Tue Jun 28, 2011 11:33 am 
Offline
Junior Member

Joined: Mon Apr 18, 2011 1:54 pm
Posts: 45
Website: http://www.rassoc.com/gregr/weblog
obs wrote:
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.


Top
   
 Post subject: Still puzzled
PostPosted: Tue Jun 28, 2011 8:37 pm 
Offline
Senior Newbie

Joined: Sun Jun 12, 2011 12:20 pm
Posts: 10
I checked and am checking. The requests are the normal stuff.

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.


Top
   
 Post subject:
PostPosted: Tue Jun 28, 2011 9:51 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
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.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject: Yes...
PostPosted: Tue Jun 28, 2011 10:44 pm 
Offline
Senior Newbie

Joined: Sun Jun 12, 2011 12:20 pm
Posts: 10
I used SuEXEC so each vhost uses seperate php running its own uid/gid.

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 wrote:
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group