I have a droplet with 1GB of memory on which I only run an email server.
every couple of days I have to restart the server because I can’t ssh into it:
"ssh_exchange_identification: read: Connection reset by peer"
when I use the web-based console to login, and after I am dropped into the shell, I am unable to run any command:
$ ls
zsh: fork failed: cannot allocate memory
since I am not running any other services (such as DBs) I believe 1GB of RAM should be plenty to run an email server, so I was wondering if this issue is caused by something else.
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!
The issue was a buggy ‘auto_ssh’ script from another linux box that created a new connection every 5 minutes without checking for an active one,
Hello, all
What I would usually do if I’m getting that error on a Droplet with 1GB of RAM, is to add swap space, that way you would have some extra buffer in case that your RAM is fully exhausted.
You can follow the steps on how to do that here:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04
Hope that this helps! Regards, Alex
cannot allocate memory
Your droplet is running out of memory. It’s possible that you’re using a program that has a memory leak or one that simply needs a lot of memory. Try adding swap to your droplet: How To Add Swap on Ubuntu 14.04 | DigitalOcean.
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.