How Do I Identify Cause of CPU Spikes
htop shows apache as the culprit
/usr/sbin/apache2 -k start
This started on the 6th and the traffic to my wordpress site is down, so it's not a usage thing. Also no changes were made on or around the 6th
Nothing funny in the apache logs either.
Any help is appreciated!
Linode 2048
(Latest 3.0 (3.0.4-linode38))
6 Replies
maxclient, I figured was great, been running without issues since I moved to this bigger Linode, no issues with traffic it's down not UP right now.
# apache2 -V
Server version: Apache/2.2.14 (Ubuntu)
Server loaded: APR 1.3.8, APR-Util 1.3.9
Compiled using: APR 1.3.8, APR-Util 1.3.9
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
apach2.conf
Timeout 300
KeepAlive On
KeepAliveTimeout 5
<ifmodule mpm_prefork_module="">StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 80
MaxRequestsPerChild 0</ifmodule>
I want to know how to identify the script or web page that is causing the CPU to jump… I do not think this is a max client type issue.
Many thanks
%D or %T format string
No luck so far and still dealing with issues since the 6th.. have no clue what happened on the 6th, no changes on my end.
@kutu:
Thanks Vance
No luck so far and still dealing with issues since the 6th.. have no clue what happened on the 6th, no changes on my end.
Try lowering your MaxClients. If your apache instances are taking up a lot of memory (ie lots of installed modules), 80 may be too many even on a 2048.
Have you seen a traffic spike since the 6th? It could be that you just weren't getting up to the MaxClients before that. That's how I got bit the first time with this issue. I was fine with low traffic, then a traffic spike actually caused my server to get up to the MaxClients. It was too high and I was screwed.