Earthly OOM / killed under high parallelism in CI
BuildKit executes independent targets in parallel. On a memory-constrained runner, many heavy targets running at once can exhaust RAM and the kernel OOM-kills a step, which surfaces as "signal: killed".
What this error means
A build step dies with "process ... did not complete successfully: signal: killed" or the whole job is OOM-killed while several targets run concurrently.
+compile | c++: fatal error: Killed signal terminated program cc1plus
Error: solve: failed to solve: process "/bin/sh -c make -j" did not complete successfully: signal: killedCommon causes
Too many heavy targets running in parallel
BuildKit parallelizes the graph. Several memory-hungry compiles at once can exceed the runner's RAM and trigger the OOM killer.
An unbounded make/build inside a target
A make -j with no job limit spawns as many compilers as cores, multiplying memory use inside one target.
How to fix it
Cap BuildKit parallelism
Limit how many targets buildkitd runs at once so total memory stays within the runner.
export EARTHLY_BUILDKIT_MAX_PARALLELISM=4
earthly +buildBound job counts inside targets
- Set an explicit job limit on make and other parallel tools.
- Use a runner with more memory for heavy compiles.
- Split very large targets so peak memory is lower.
RUN make -j2How to prevent it
- Cap BuildKit parallelism on constrained runners.
- Bound
-jon make and similar tools. - Right-size runner memory for the build.