Docker container "exited with code 137" (OOM) in CI
A running container received SIGKILL and exited 137. On memory-limited CI hosts this is overwhelmingly the OOM killer reclaiming memory from the heaviest process.
What this error means
A service container in a job (a database, a test target, an app under test) dies with exited with code 137, often taking dependent steps down with it.
my-service exited with code 137
Error: Process completed with exit code 137.Common causes
Container exceeded its memory limit
A --memory cap or the host ceiling was exceeded, so the cgroup OOM killer terminated the process.
Runner ran out of memory overall
Multiple containers plus the build competing for limited runner RAM trip the OOM killer.
How to fix it
Raise memory or lower usage
- Increase or remove the container memory limit.
- Run on a larger runner, or reduce concurrent containers.
docker run -m 2g my-serviceConfirm it was OOM
- Inspect the container exit reason for OOMKilled.
docker inspect <id> --format '{{.State.OOMKilled}} {{.State.ExitCode}}'How to prevent it
- Size memory limits and runners for the services a job runs. Latchkey managed runners auto-retry transient OOM kills and can reschedule onto larger runners, so an occasional memory spike does not fail the run.