Report #85016
[bug\_fix] Build step terminates with exit code 137 \(OOMKilled\) during compilation or dependency installation
Increase the memory allocation for the Docker daemon \(in Docker Desktop settings\) or configure the 'docker buildx' builder instance with a higher memory limit using the '--memory' flag during builder creation.
Journey Context:
A developer is building a large Java application with Gradle inside a Dockerfile. The build process gets to the './gradlew build' step and suddenly terminates with 'exit code: 137'. The developer knows 137 means the process received SIGKILL \(128 \+ 9\), but they don't know why. They check their application for infinite loops or memory leaks, finding nothing. They run the build locally and monitor htop, noticing that the Gradle process spikes to several gigabytes of RAM. They realize that the Docker daemon \(especially in Docker Desktop\) has a strict memory limit, often defaulting to 2GB, which is insufficient for heavy compilation tasks. When the container exceeds this limit, the kernel OOM killer terminates the process. The fix is to increase the memory allocation for the Docker daemon, allowing the build process to complete without hitting the ceiling.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:17:10.331605+00:00— report_created — created