Skip to main content

High CPU Usage & PHP-FPM Resource Exhaustion on VPS

Comments

4 comments

  • cPRex Jurassic Moderator

    Hey there!  There isn't going to be a specific recommendation I can provide that will make the situation better, as all servers are unique.  It also looks like the "top" output and the WHM screenshot showing the high load are different so I can't tel anything conclusive from those.

    What does "top" look like during one of the periods of high load?  

    0
  • Sohaib Raheem

    Thank you for the response. The screenshots were taken at slightly different moments, which is why they may not appear to align perfectly. I will monitor the server closely and capture the exact "top" output at the time the CPU spikes to 100%.

    Today, the Server works all good, as I updated PHP version from 8.2 to 8.4, and change the values of:
    pm.max_children = from 120 to 150
    pm.max_requests = from 500 to 400
    pm.process_idle_timeout = from 10 to 50

    But yesterday (and earlier), it went high many times, and I did PHP-FPM restart to keep it back to normal, multiple times. I also feel that there should be a need to optimize the Database and indexing the tables (maybe that will be helpful). 

    0
  • Sohaib Raheem

    Hi cPRex, this happened just now, can you please have a look and suggest something if you see anything, please. (It was working fine in the last 3 days). Now, I've restarted the PHP-FPM to make it down. Thank you.



    0
  • cPRex Jurassic Moderator

    Thanks for sharing those screenshots.  This is showing that your system is completely out of both CPU and RAM resources, so the server is completely overloaded.

    You mentioned that this is a high traffic site, but is it possible there is a DoS happening that is causing this load?  In the past, has the site been working well with the same configurations or has the hosting environment recently changed?

    Ultimately, there likely isn't going to be much I can recommend in this situation since the server is just out of resources, so a configuration adjustment is likely not the answer.

    0

Please sign in to leave a comment.