act container "exited with code 137" (OOM) running Actions locally
Exit code 137 means the container received SIGKILL (128 + 9). During act runs this is almost always the out-of-memory killer: the job needed more RAM than Docker Desktop was allotted.
What this error means
A step or the whole job stops with "exited with code 137", often right after a memory-heavy build or test, with no application error printed.
[CI/build] container for step exited with code 137
Error: The process '/usr/bin/docker' failed with exit code 137Common causes
Docker Desktop memory limit is too low
Local Docker caps memory (often 2 to 4 GB by default). A build that fits GitHub-hosted 7 GB runners is killed locally.
A single step allocates more than available
A test suite or compiler spikes past the container limit and the OOM killer terminates the process.
How to fix it
Raise Docker Desktop memory
- Open Docker Desktop Settings, Resources, and increase the memory limit.
- Apply and restart Docker.
- Re-run act; the container now has headroom.
Reduce the step memory footprint
Limit parallelism in the memory-heavy step so it stays under the container ceiling.
# run tests with fewer workers to cut peak memory
pytest -n 2How to prevent it
- Give Docker Desktop enough memory to mirror the 7 GB hosted runner.
- Cap parallelism in memory-heavy steps for local runs.
- Remember local resources differ from GitHub-hosted runners.