Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OutOfMemoryError while deploying after deploying container on AWS

I am trying to deploy an application (https://github.com/DivanteLtd/open-loyalty/) to amazon web services or AWS. This app has a docker-compose file. So, i am directly running 'ecs-cli compose up' from ecs-cli from my local machine.

It runs succesfully and runs all the containers, but after some time what it shows an error.

ExitCode: 137 Reason: OutOfMemoryError: Container killed due to memory usage

I don't understand what's its for. Can you please help?

Thank You.

like image 210
vivekpadia70 Avatar asked Aug 20 '17 17:08

vivekpadia70


1 Answers

Docker has an OOM-killer that lurks in the dark and is killing your instance.

This happens either because your container needs more memory than allowed in its mem_limit setting (defined in your aws compose yml file), or because your docker host is running out of memory.

You'd typically address this by tweaking the mem_limit settings for each of your containers and/or by switching to a larger EC2 instance.

like image 53
David Tobiano Avatar answered Oct 04 '22 20:10

David Tobiano