Question

Server Crashes With spikes in CPU and Disk IO

Hi, yesterday I set up a WordPress server with 1GB Droplet for WordPress with 1GB separate droplet for Mysql Database. Today I after I logged in to control panel I saw a sudden Spike in CPU and Disk IO and A sudden Fall in Ram after that. I checked my website its down server was frozen, I tried to ssh to the server and tried to restart the apache, nothing worked so I had to restart the server from control panel

this is the apache /var/log/apache2/error.log ->https://pastebin.com/7ZFx2d3T and this is the screenshot of the graphs -> https://drive.google.com/open?id=1ALH9rSALrfHD_gP48P248AXKUGFxt6Vi

(Logs time zone and graph time zones are different )


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.

Hello,

It looks like that there was a spike in your traffic which caused the sudden CPU load. What I could suggest is:

  • Make sure to add enough resources to your Droplet, you could run a stress test in order to be able to determine how many visitors your site could handle at once:

https://www.digitalocean.com/community/tutorials/an-introduction-to-load-testing

  • Also make sure to optimize your Wordpress website, for example, delete all plugins that are not absolutely necessary, install a caching plugin and maybe enable a CDN

  • Check your logs and make sure that there was no malicious traffic towards your site, you could, for example, use this script here to summarize your access logs.

Regards, Bobby