Why is my Website very unstable and keeps going down? Why is MySQL maxing out my CPY?

Hi over the last few days i have been getting server timeout and the website hanging, and from what i can see it is saying that MySQL is causing this by looking at the monitor graphs in the DO dashboard.

I have not changed anything on the site since this started apart from updating plugins as normal and updating and changing some stock. I have reverted to the older plugins just in case also, but its still the same.

I have even upgraded to the next droplet, even though it was fine beforehand

It just keeps maxing out the cpu and then the website crashes. Unfortunately i am clueless to this technical stuff and the person who helps me with this site is away and unreachable(great timing i know!) so im desperate for any help(bearing in mind i dont have much technical ability - I have done websites in past on my own, but used managed websites un like DO)

I have attached my MySQL log as i read somewhere this may be useful but i dont know what it even means.

Link to Logs from MySQL

Any help or advice desperately needed.

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 @andylettis

Can you run top or htop (might need to install first sudo apt install htop) and monitor which processes are taking a lot of resources.

If you’re running WordPress or another heavy CMS, then you might be hit with large number of requests, so have a look in your access log:

tail -f /var/log/apache2/access.log
# Press CTRL+C to exit monitor

I’m not going to look through 130 MB of MySQL slow log. We’re only interested in the error logs, but the problem is most likely not MySQL.