Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Apache2 100% CPU spikes
PostPosted: Fri May 01, 2015 12:43 am 
Offline
Senior Newbie

Joined: Mon Sep 29, 2014 1:21 am
Posts: 17
Hi,

I have 6 wordpress websites running on my Ubuntu Linode. Now frequently Longview sees Apache2 spiking 100% CPU which causes slow website performance.

My guess it's a plugin or basically just one wordpress installation that causes it. My question is how can I find out which out of the 6 domains is causing this CPU spike?

It's been going on for a few days now...

Many thanks,

Regards
Rob

Image


Top
   
PostPosted: Fri May 01, 2015 9:38 am 
Offline
Senior Member

Joined: Fri Feb 13, 2015 8:12 pm
Posts: 101
Use a different apache log file for each virtual domain. Then look at /var/log/apache2 and most likely you will find a correlation between high CPU usage and some pattern of web requests.

In either case, if you are only using WordPress, try nginx + php5-fpm.


Top
   
PostPosted: Mon May 04, 2015 12:40 am 
Offline
Senior Newbie

Joined: Mon Sep 29, 2014 1:21 am
Posts: 17
I've checked all logfiles per domain without any pattern that could result in high CPU.

I've also added deny from all in .htaccess per domain to see if that would stop the high cpu. Didn't have any result.

The 100% CPU spikes happen every day at 11:45 till around 12:15. Very consistent every day. Mornings from like 9:00 to 9:15 as well.

What other options do I have to find out where this comes from?

Thanks


Top
   
PostPosted: Mon May 04, 2015 6:19 pm 
Offline
Senior Member

Joined: Fri Feb 13, 2015 8:12 pm
Posts: 101
Apache does not consume CPU for fun (well, some people may disagree about that :-). It does consume CPU to serve web requests.
So, if you see high CPU usage in Apache, there must be http requests to justify the load.

Try making histograms of web visits. For example, number of web requests in one-minute intervals, or in five-minute intervals.
At least one of your six domains should have a peak at the same time you see high CPU load.


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


Who is online

Users browsing this forum: No registered users and 2 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