ci: cap runner container memory - #198
Merged
Merged
Conversation
Contributor
Uncapped runner containers can overcommit a host, letting the kernel OOM killer take jobs down with exit 137. Add RUNNER_MEMORY (derived from host RAM and runner count) and RUNNER_INSTANCES for shrinking. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USi6dgUFQi4VJZPLZ6xk44
wavekat-eason
force-pushed
the
ci/runner-memory-limits
branch
from
September 13, 2026 05:14
dcdcc66 to
9673e41
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Runner containers had no memory limit, so a busy pool could overcommit its host. When that happens the kernel's OOM killer picks a victim host-wide, and a job fails with
Killed/ exit 137 through no fault of its own.What
setup-gha-runners-docker.sh: newRUNNER_MEMORY→--memory X --memory-swap X. The default is(host RAM − RUNNER_HOST_RESERVE_GB) / RUNNER_COUNTwith a 4 GB reserve. The script warns below 3 GB, and an empty string opts out. It also warns when instances aboveRUNNER_COUNTare still installed.uninstall-gha-runners-docker.sh: newRUNNER_INSTANCES="3 4"to remove only some instances.docs/06: a memory section with how to diagnose exit 137, the sizing rule, and the shrink procedure. It also trims the cloud-cache section and theCLAUDE.mdpointer to general guidance.Both scripts pass
bash -n.🤖 Generated with Claude Code
https://claude.ai/code/session_01USi6dgUFQi4VJZPLZ6xk44