php-fpm high cpu usage
Hi,
My VPS server has been running fine for many months but this morning at around 10am cpu usage has gone up hugely and the server and single website it hosts is extremely slow/unusable. I wasn't making any changes this morning and I see no signs of a DDOS or alerts in imunify360 or csf software.
PHP-FPM CPU usage is really high. Several processes showing 80% + for the 1 user with the WooCommerce website installed but as I said I didn't change anything today. Disabling all plugins and rolling back to an earlier WooCommerce version didn't help.
All in all I am a bit stuck. Any ideas for troubleshooting this?
Thanks, Keith
-
Hey there! Is it possible that one user is experiencing an attack? If they are receiving much more traffic than normal, that would seem to be the most likely scenario. The fact that you see PHP-FPM just indicates that *something* with PHP is using resources on the machine. A quick test would be to suspend the one account showing the 80% usage and see if the overall load drops. If so, the issue is either something within that account, or it is receiving too much/malicious traffic. 0 -
Hey there! Is it possible that one user is experiencing an attack? If they are receiving much more traffic than normal, that would seem to be the most likely scenario. The fact that you see PHP-FPM just indicates that *something* with PHP is using resources on the machine. A quick test would be to suspend the one account showing the 80% usage and see if the overall load drops. If so, the issue is either something within that account, or it is receiving too much/malicious traffic.
Thanks for the quick reply. The traffic seems completely normal for that account - it is the only account and is my own business website. This account is the root account. If I suspend via WHM when I unsuspend will everything be as it was?0 -
Hey there! Is it possible that one user is experiencing an attack? If they are receiving much more traffic than normal, that would seem to be the most likely scenario. The fact that you see PHP-FPM just indicates that *something* with PHP is using resources on the machine. A quick test would be to suspend the one account showing the 80% usage and see if the overall load drops. If so, the issue is either something within that account, or it is receiving too much/malicious traffic.
I've suspended the account and the usage has gone down but not as much as I expected. Edit to add: after a few more minutes for everything to settle down it seems to be back to normal usage with the account suspended. Traffic was normal on the account and nothing was changed when the cpu usage went up at 10am (8 gours ago).0 -
I've unsuspended the account and it is instantly going slow and putting the CPU load up. PHP-FPM cpu usage is very high again. There is definitely no increase in traffic. The site is in maintenance mode so traffic is actually much lower than normal. I can't work out why the load started going up at 10am when nobody was making any changes to the website. Could something that updated within WHM, EasyApache or Imunify360 have caused it? 0 -
Well, at least we have a clue that it's something related to that account. It might be time to scan the site for malware to see if there is any code running that shouldn't be that is contributing to the load. 0 -
Well, at least we have a clue that it's something related to that account. It might be time to scan the site for malware to see if there is any code running that shouldn't be that is contributing to the load.
I've tried running Imunify360's scan and WordFence Premium's but neither finished. I assume because the CPU load is too high. I do have realtime scanning enabled and it didn't alert me to any malware.0 -
Is the site using WordPress? If so, you could try disabling one plugin at a time and see if that makes a difference. 0 -
Is the site using WordPress? If so, you could try disabling one plugin at a time and see if that makes a difference.
Yes it is, I disabled every single plugin apart from WooCommerce and it still doesn't work.0 -
Instead of suspending the account, what if you replace the index page of the site with a blank index.txt file instead of the index.php, temporarily? This way, if there is a script running on the account, it won't be suspended, so you'd at least know if it's something in the site or something else in their account. 0 -
OK I've renamed index.php and uploaded a blank index.txt which results in the browser showing the text "file not found" Now I check cpu usage? Hmm actually when I go to /wp-admin/ for example it still loads normally so I don't think the blank index.txt is working. 0 -
Is this something I should submit a ticket for or would I be better trying to contact a Server Administrator? This has come at a nightmare time for me as I'm due to go on holiday on Saturday and if this isn't fixed I won't be able to go. 0 -
If you have a cPanel license, it's free and you can do it directly from WHM. 0 -
Thanks I've submitted a ticket #95061751 0 -
Just to add Imunify360 completed a scan overnight and no malware was found. High CPU load persists. 0 -
I do see we weren't able to access the server so far in the ticket, but I would still recommend pursuing a system administrator since we've already isolated the issue to the one domain. 0 -
I do see we weren't able to access the server so far in the ticket, but I would still recommend pursuing a system administrator since we've already isolated the issue to the one domain.
Yes I disabled sever access temporarily while my host looked into it. I didn't want 2 people making changes at the same time. Unfortunately the host only told me what I already knew - that PHP-FHM was consuming the resources. As the site has been running fine for months if not years I am going to restore a full site and database backup from a few days ago. If that doesn't work then it'll be time for the system admin...0 -
After weeks of running slow and me being on the verge on moving to a new server my VPS has just miraculously come back to life and is running at full speed again. How can I check if background updates have been run that may have been fixed it? 0 -
@Keith1976 - since it is a VPS, the most likely explanation is that something else on the server, such as another account or user causing issues, was suspended or removed, allowing the whole machine to run more efficiently. It's unlikely any specific update would offer a dramatic performance increase. You can check the system updates in /var/log/yum.log (for CentOS 7) or /var/log/dnf.log (for AlmaLinux 8) but my above explanation is much more likely. 0 -
@Keith1976 - since it is a VPS, the most likely explanation is that something else on the server, such as another account or user causing issues, was suspended or removed, allowing the whole machine to run more efficiently. It's unlikely any specific update would offer a dramatic performance increase. You can check the system updates in /var/log/yum.log (for CentOS 7) or /var/log/dnf.log (for AlmaLinux 8) but my above explanation is much more likely.
Sounds likely. The sys admin I got to look in to said it was most likely to be caused by a noisy neighbour on another VPS on the machine. I checked the updates and nothing at all was updated around the time things went back to normal. I guess this is the sort of situation where a dedicated server helps.0 -
Having a dedicated server would definitely eliminate the guesswork from these types of issues! 0
Please sign in to leave a comment.
Comments
22 comments