Skip to content

ci: cap runner container memory - #198

Merged
wavekat-eason merged 1 commit into
mainfrom
ci/runner-memory-limits
Sep 13, 2026
Merged

wavekat-eason merged 1 commit into
mainfrom
ci/runner-memory-limits

Conversation

@wavekat-eason

@wavekat-eason wavekat-eason commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

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: new RUNNER_MEMORY → --memory X --memory-swap X. The default is (host RAM − RUNNER_HOST_RESERVE_GB) / RUNNER_COUNT with a 4 GB reserve. The script warns below 3 GB, and an empty string opts out. It also warns when instances above RUNNER_COUNT are still installed.
  • uninstall-gha-runners-docker.sh: new RUNNER_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 the CLAUDE.md pointer to general guidance.

Both scripts pass bash -n.

🤖 Generated with Claude Code

https://claude.ai/code/session_01USi6dgUFQi4VJZPLZ6xk44

@github-actions

Copy link
Copy Markdown
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
wavekat-eason force-pushed the ci/runner-memory-limits branch from dcdcc66 to 9673e41 Compare September 13, 2026 05:14
@wavekat-eason
wavekat-eason merged commit 905cd6c into main Sep 13, 2026
2 checks passed
@wavekat-eason
wavekat-eason deleted the ci/runner-memory-limits branch September 13, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant