I am doing a composer update and getting an error "Out of memory: killed process php"

Posted October 2, 2020 1.9k views

I have the most basic package / droplet but I am not doing anything special and the droplet is barely being touched with over 500mb memory available.

It would be useful to at least see what part of the update is breaking it?

Any ideas?

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
1 answer

Hi there @kinsleyransom,

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!

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.