By learyjk
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.
Some articles suggest the Ghost mySQL instance causes the crash by triggering an out of memory error.
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/wordpress-mysql-crash
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!
Hi, I am having the same issue and when i visit server analytics, It shows 100% cpu, disk usage.
I just followed an internet guide to set up a blog on ghost and its way more trouble than anticipated.
Need help to troubleshoot this.
Hi there,
I could suggest starting by checking the monitoring graphs for your Droplet via your DigitalOcean control panel. There you will be able to identify if this is caused by a memory spike or a CPU spike.
Also, if this is due to a memory leak in Ghost, I could suggest upgrading your Ghost instance to the latest one. You can follow the steps from the official Ghost documentation here:
https://ghost.org/docs/update/
If you like to be extra safe, make sure to take a backup/snapshot of your Droplet before you proceed with the upgrade so that in case if anything goes wrong, you would be able to revert back to a working version.
Another thing that I could suggest is checking your system logs to see if there are any errors that could point you to the right direction. On Ubuntu, you could find the logs at: /var/log/syslog.
Let me know how it goes! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.