Sudden CPU increase on Php processes.

AdamDresch

Well-Known Member
Jun 22, 2006
80
0
156
Hi all

I got an email alert earlier about high cpu usage, but figured it was the backups running, but I've had a few more since, so decided to check top, the cpu usage for each php thread, is extremely high, but I don't know why


23068 x 20 0 438m 73m 39m R 85.4 1.8 0:48.82 php
22446 x 20 0 420m 65m 49m S 52.5 1.6 1:20.16 php
23055 x 20 0 419m 54m 39m R 51.8 1.4 1:04.62 php
23670 x 20 0 440m 74m 38m R 45.2 1.9 0:27.18 php
23667 x 20 0 440m 72m 36m R 31.9 1.8 0:27.57 php
23658 x 20 0 436m 70m 39m S 14.6 1.8 0:32.80 php
9852 mysql 15 -5 4378m 521m 5080 S 6.3 13.0 361:28.55 mysqld
21871 x 20 0 514m 88m 70m S 6.0 2.2 0:05.33 php
20706 x 20 0 507m 30m 19m S 1.7 0.8 0:08.85 php

It seems to be the same account/user which is resulting in high cpu usage, but it's a barely active forum, with few guests/members on it, so I'm confused as to why all of a sudden it's got such high cpu usage for each thread/process

Apache 2.2.24 is running as FastCGI, is running php 5.3.24, which was updated a few days ago from the previous version of 5.3.23

Any thoughts?
 

arunsv84

Well-Known Member
Oct 20, 2008
373
1
68
127.0.0.1
cPanel Access Level
Root Administrator
Check the access logs for that domain. Could be related to hits from a particular ip. Block it if required. You may need to scan the account for suspicious scripts as well.

/home/username/access_log/domainame.com

Above is the location to access logs for the particular domain.

Cheers!!!
 

AdamDresch

Well-Known Member
Jun 22, 2006
80
0
156
Yea I can't see anything out of the ordinary, really confused, CPU load is high again today
Same process/issue, yet nothing out of the ordinary, as far as bandwith use or logs go.
 

arunsv84

Well-Known Member
Oct 20, 2008
373
1
68
127.0.0.1
cPanel Access Level
Root Administrator
Are you sure the php processes are not consuming resources? Have you checked the Apache status page from WHM? It will give you better idea.

If everything is normal, you should consider checking iowait and hard disk health status. If you see high iowait there is a big problem on your server that can lead to data loss as well. You should check for errors at /var/log/messages, dmesg, boot.log and any other system log files. Look for disk I/O errors, failed read/write operations, bad sectors, memory errors and kernel panics. The three most likely culprits of high iowait are bad disk, faulty memory and network problems.

Hope this helps.

Thanks!