Docker-compose exit code is 137 when there is no OOM exception
It might be issue with RAM, I have increased the memory using Docker preferences. Started my service with docker-compose up
. The server is up for me without any issue.
https://www.petefreitag.com/item/848.cfm
The error message strikes me as: Aborting on container exit...
From docker-compose docs:
--abort-on-container-exit Stops all containers if any container was stopped.
Are you running docker-compose with this flag? If that is the case, think about what it means.
Once b-combined
is finished, it simply exits. That means, container b-db
will be forced to stop as well. Even though b-combined
returned with exit code 0, b-db
forced shutdown was likely not handled gracefully by mongodb.
EDIT: I just realized you have --exit-code-from
in the command line. That implies --abort-on-container-exit
.
Solution: b-db
needs more time to exit gracefully. Using docker-compose up --timeout 600
avoids the error.
Docker exit code 137 implies Docker doesn't have enough RAM to finish the work.
Unfortunately Docker consumes a lot of RAM.
Go to Docker Desktop app > Preferences > Resources > Advanced and increase the MEMORY - best to double it.