Report this

What is the reason for this report?

Ghost Blog on 1GB Droplet Crashes Every 5 Days or So

Posted on March 2, 2021

Hello,

I am having an issue with my Ghost blog crashing every 5 days or so which causes a 502 Bad Gateway Error. To fix the issue, I just have to log in to Digital Ocean and cycle power to the server and everything boots back up and I can access my website again.

How can I prevent this intermittent shutdown behavior?

I have done some research on here and have a few ideas but am not sure where I should start, how to diagnose, and how to test.

  1. Some articles suggest the Ghost mySQL instance causes the crash by triggering an out of memory error.

  2. Another article I ready referred to Cloudflare cache causing hourly CPU spikes which could crash the ghost instance as well.

Possible fixes include: setting up a SWAP partition for memory, tuning the mySQL install using MySQLTuner, and playing with the cache settings in Cloudflare.

I tried to look at the mySQL error logs but I can only ssh to the server after restarting it, and the logs only show the shutdown and restart which I triggered.

I have very low traffic (less than 20 per day). I use ghost blog hosted by Digital Ocean VPS, domain from Namecheap, and Cloudflare for CDN.

Thank you!

These articles seem to describe the symptoms I am having:

https://www.digitalocean.com/community/questions/droplet-consistently-high-memory-usage-causing-out-of-memory-errors-mysql

https://www.digitalocean.com/community/questions/wordpress-mysql-crash

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.