Question

Does The Droplet VM Automatically Restart?

I’m running a Discord bot that stores data in memory, and I picked a DigitalOcean Droplet VM to host it on using PM2 to keep it up 24/7 for the reason that I can keep stuff in memory 99.9% of time, and load from a backup when needed. However, I ran into the issue that it already went down and had restart the bot after just a few hours. Is this a DigitalOcean issue?


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.

alexdo
Site Moderator
Site Moderator badge
December 6, 2022

Hello @c0nd

As mentioned make sure that the droplet has SWAP space added and furthermore examine the server logs.

You can check for any killed processes and see if there is a pending update using the following command:

  1. pm2 update

Regards

KFSys
Site Moderator
Site Moderator badge
December 4, 2022

Hi @c0nd,

The issue might be coming from a lack of resources. Have you checked your logs as to what happened?

Additionally, what you can do is try to add SWAP to see if that would improve the situation:

https://www.digitalocean.com/community/tutorial_collections/how-to-add-swap-space

Swap is a portion of hard drive storage that has been set aside for the operating system to temporarily store data that it can no longer hold in RAM. This lets you increase the amount of information that your server can keep in its working memory, with some caveats. The swap space on the hard drive will be used mainly when there is no longer sufficient space in RAM to hold in-use application data.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel