droplet keeps running out of memory

  • Posted November 2, 2014

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.


same issue for me , anybody could help?

Submit an 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.

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.

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:

Hope that this helps! Regards, Alex

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,