Skip to content

ci: run the turbo gate one task per vCPU so its runner keeps enough memory - #2696

Merged
fforootd merged 2 commits into
mainfrom
claude/gate-turbo-memory
Nov 4, 2026
Merged

fforootd merged 2 commits into
mainfrom
claude/gate-turbo-memory

Conversation

@fforootd

@fforootd fforootd commented Nov 4, 2026

Copy link
Copy Markdown
Member

Summary

gate-turbo runs its graph at turbo's default concurrency of 10 on a GitHub-hosted ubuntu-24.04 runner (4 vCPU, 16 GB, 3 GB swap, per the runner's own nproc/free). On a wide graph that fills memory, and the hosted runner's agent stops the runner. Every running task then exits 137 in the same second, under The runner has received a shutdown signal. This PR runs the gate's graph one task per vCPU (--concurrency=100%, 4 on this runner).

Since 2026-11-03 this has killed 9 gate-turbo jobs on 8 branches: #2451 (twice), #2452, the merge-queue entry of #2675, a Dependabot PR and four others. Main's own forced nightly hit it on 2026-10-31. full-pr never does: it runs on depot-ubuntu-24.04-16 (64 GB). The turbo jobs moved to hosted runners in #2483, which noted that resource use there was not yet validated.

The kill is not the kernel's OOM killer. dmesg logged no kill, and systemd-oomd is inactive on these runners. A probe run sampled memory every 5 s. At concurrency 10, in the last 30 s before the shutdown:

  • 339 MB available, the 3 GB of swap full, memory pressure stalling 15–17% of the time (PSI full).
  • compile processes held 9.3 GB. Four separate go commands (the server's build, vet, lint, test and database-lane tasks each run their own) were each compiling a large package of the server module at 1.5–1.8 GB.
  • Beside them, next build held 1.1–1.6 GB, plus a vitest browser suite.

Validation

Forced runs (force=true, no cache, every task and both database lanes) of #2451's head a488aa1e0 on this branch, from a temporary probe commit that has since been dropped. It checked out that commit, sampled memory, and skipped the journey and e2e-lanes jobs:

--concurrency Result Lowest available memory Peak swap Graph time
default (10) runner shut down at 13 min 339 MB 3071 MB (full) —
6 passed, 153/153 tasks 857 MB 811 MB 33m05s
4 (= this PR's 100%) passed, 153/153 tasks 3382 MB 0 MB 26m15s

Runs: 10, 6, 4. For comparison, main's forced nightly at the default concurrency took 29 min on 2026-11-03. One task per vCPU is no slower, because ten CPU-bound tasks on four cores bought no throughput.

  • turbo run lint --concurrency=100% --dry=json --filter=@zitadel/server (turbo 2.11.7 accepts the percentage form)
  • ruby -ryaml -e '…' over the workflow, git diff --check
  • node scripts/check-pr-title.mjs --title "…"

Release notes / changeset

No changeset required — no shipped behavior changed.

🤖 Generated with Claude Code

…emory

At turbo's default concurrency of 10, gate-turbo's GitHub-hosted runner
(4 vCPU, 16 GB, 3 GB swap) ran out of memory on wide graphs, and the
hosted runner's agent stopped it: every running task exited 137 under
"The runner has received a shutdown signal".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 04:23
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloud Ready Ready Preview Nov 4, 2026 4:41am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-04T04:26:33.345182Z b7d3b2d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ No Changeset found

Latest commit: c2ff0de

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟢 Approval recommended

The review identifies only a non-blocking documentation nit while the workflow change is a straightforward concurrency flag adjustment intended to reduce runner memory pressure, with no active issues raised against merging.

No open issues 🎉

What changed in this PR

This pull request updates the gate-turbo CI workflow to limit Turbo’s task execution concurrency to one task per vCPU (--concurrency=100%) on GitHub-hosted ubuntu-24.04 runners, reducing peak memory pressure and avoiding runner shutdowns (exit 137) caused by overly parallel builds.

Changes:

  • Add --concurrency=100% to the turbo run invocation in the gate-turbo job so concurrency scales with available CPUs rather than using Turbo’s default of 10.
  • Add/adjust workflow comments documenting the rationale (hosted runner memory/swap pressure and shutdown behavior).

Noted nit (non-blocking): the workflow comment currently hard-codes the runner’s vCPU count (“4 here”); since --concurrency=100% already adapts to runner sizing, that wording could become misleading if runner specs change.

File Summary
.github/​workflows/​ci-turbo.yml Limit Turbo graph concurrency to 100% of available vCPUs for gate-turbo to reduce memory pressure on hosted runners and prevent runner shutdowns.

Review effort: Balanced

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fforootd
fforootd added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit fc1cbf2 Nov 4, 2026
21 checks passed
@fforootd
fforootd deleted the claude/gate-turbo-memory branch November 4, 2026 05:02
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Nov 4, 2026

This branch was successfully deployed

1 active deployment
Preview — c2ff0de8 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants