Question

High CPU and LOAD

Hi,

The last 3 days the CPU and the Load has been at maximum constantly on my Droplet. I dont know what the problem is. I have googled some and I have tested some things.

Here is a link of Droplet Graphs, free -m on the Droplet and of the top -c stats of the droplet.

If someone can help me understand what si going on it will help alot in starting figuring out what is happening on the Droplet.

Best regards.


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.

I also have the same problems in the last 24hrs - server has been fine for months and regularly in the last day it slows down and MySQL bombs and cannot connect - let me know how you get on with your droplet I guess we have similar issues

Hello,

As far as I can see the majority of the CPU usage is due to MySQL. What I could suggest is to follow the steps from this answer here on how to tweak MySQL for better performance and reliability:

https://www.digitalocean.com/community/questions/how-to-tweak-mysql-mariadb-configuration-for-increased-performance-and-stability

Also, PHP-FPM is the second service that is consuming quite a bit of resources. For this, I could suggest installing a caching module like PHP OPcache:

https://devdojo.com/bobbyiliev/how-to-speed-up-your-laravel-application-with-php-opcache

Also enabling a CDN for your website and installing a caching plugin could also reduce the overall load on the server.

If none of those methods help, I could suggest adding a little bit more hardware power so that you could have some extra buffer.

Let me know how it goes. Regards, Bobby