I am a newbie to digitalocean.
I have just created the smallest VPS and then install python, pip and all required python modules in order to move my scripts which work fine on local server.
Right now, my script starts without any problem but suddenly gets killed. How can I understand the reason and solve this problem?
Do you have any idea under which circumstances digitalocean VPS kills any running script?
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!
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
If this is smallest Droplet it could that script run out of memory. You should check syslog for Out Of Memory killer. syslog is located at
/var/log/syslogand you can opet it with your favourite text editor:
Here you can try to find Out of Memory (OOM) killer signal. If there are for your script, it means you ran out of memory. If you need help with logs, post part of it here, but make sure you redact sensitive informations if they are any.
In such cases where you have the smallest Droplets, it’s possible the issue is happening because you don’t have enough memory. That could be checked in the
/var/log/sysloglog. If that is the case, you’ll OOM signals which are Out of Memory messages.
In such cashes people would go for the upgrade right away, having said that, before that you can try using SWAP. 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.
The information written to disk will be significantly slower than information kept in RAM, but the operating system will prefer to keep running application data in memory and use swap for the older data. Overall, having swap space as a fallback for when your system’s RAM is depleted can be a good safety net against out-of-memory exceptions on systems with non-SSD storage available
More about that here: