my drpolet CPU is showning 96% used and my website is braking what i do next?

Posted June 19, 2020 609 views
ApacheUbuntu 18.04

I install Ubuntu WordPress on 18.04 on droplet and My droplet CPU is showing to 96% used and my website is breaking and I have low web traffic so what I do next?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi there @waseemjani141rbLobster,

I would recommend following the steps from this answer here on how to check what exactly is consuming the most of your server resources:

Feel free to share the output of the commands here so that I could try to advise you further!


Hi @waseemjani141rbLobster,

As @bobbyiliev mentioned you can use “htop” to see the processes causing the load on your server. A few tips from me would be:

1 - Check the free memory, because sometimes you might be running low in memory and Linux will try to relocate some of the used memory to the SWAP. However this can consume a lot of CPU sometimes. The process name should be “kswapd”.

2 - Check the web server log files for any errors, also the access log to see the incoming traffic and what it is exactly trying to GET. Having a page which is fetching a lot of information and proccessing it on a single page … you can imagine what happens when somebody is spamming the refresh (Simply put).

3 - Check the active processes in your database. Sometime Wordpress might be running heavy SQL queries which are causing the SQL server to consume a lot of CPU and memory. This can be done by running first “mysql” and then run “show full processlist \G”. If you have queries running for a longer period(this also might be caused by the CPU usage) of time or a lot of “SELECT” ones …

Best Regards,
Ivan / YoghurtPower