Question

My site has been shutting down automatically with the message "out of memory".

Posted July 23, 2014 2.5k views

My site has been shutting down automatically with the message “out of memory”. I don’t quite get that, as we are not using a lot of memory, but maybe it’s true. I’m not finding any articles about how to increase memory. Has anyone else come upon this issue, or have any ideas of how to proceed?

Thank you!!

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.

×
Submit an Answer
2 answers

Add swap space (there is a tutorial for that) or move to a larger droplet.

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

by Brian Boucheron
One way to guard against out-of-memory errors in applications is to add some swap space to your server. In this guide, we will cover how to add a swap file to an Ubuntu 20.04 server.