By matheussiq8
For the last 6 months I’ve been running Ghost with Node.js here on DigitalOcean. As I’m not very good with all the technical server related topics I always use the forum to find most of the questions and problems that I have. Nevertheless something has been happening each 2 weeks or so with my Ghost blog. It works perfectly fine for a couple of weeks and then it shows:
<^>502 Bad Gateway
nginx/1.4.6 (Ubuntu) <^>
I then have to manually go to console access and type then the service ghost-XXXX restart to get it back to normal. Is there anyway to change this or to create each week create an automatic action to run this code at least so I don’t have to do it manually?
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!
This question was answered by @ryanpq:
The most common reason for services to suddenly stop on a droplet (especially a small one) is those services running out of available memory. I would recommend setting up a swap file which should resolve this issue and seeing if the 502 errors you have been encountering continue. This tutorial will guide you in the process.
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.