I have a droplet set up with nginx web server. Yesterday, I noticed the application was not opening, so I checked nginx service and turns out it stopped for seeminly no reason. Manual service restart gets things back to normal. Screenshot for what I saw: https://i.imgur.com/mAfRV0y.png
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!
Hello there,
My assumption here is that the droplet is running out of memory and the Nginx processes get killed.
You can check the Nginx error log using the bellow command:
- tail -f /var/log/nginx/error.log
Here is a link to an answer on how to troubleshoot common Nginx problems:
Another thing is adding SWAP to your droplet. A SWAP is an area on a hard drive that has been designated as a place where the operating system can temporarily store data that it can no longer hold in RAM. Basically, this gives you the ability to increase the amount of information that your server can keep in its working “memory”, with some caveats.
If you haven’t done this yet check our article:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-18-04
Hope that this helps!
Hi @,
Most probably your Nginx was killed by the Droplet. This happens when your Droplet runs out of Memory. There are a couple of ways to go about the problem but first check your Nginx error log to see what was the exact error experienced. There are a couple of ways to check the error log:
If you want to monitor the log you can use :
- tail -f /var/log/nginx/error.log
If you want to check the last 200 lines:
- tail -n200 /var/log/nginx/error.log
I would go with the last command. From there you can check the date of the entry and see the exact error.
Another thing which I would suggest is adding SWAP to your Droplet. Here are a couple of tutorials which can help with that:
https://www.digitalocean.com/community/tutorial_collections/how-to-add-swap-space
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.