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

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?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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!

Regards, Bobby

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