Skip to content

Raise Cloud Run request concurrency from 4 to 6#3758

Merged
anth-volk merged 2 commits into
masterfrom
feat/cloud-run-concurrency-6
Jul 21, 2026
Merged

Raise Cloud Run request concurrency from 4 to 6#3758
anth-volk merged 2 commits into
masterfrom
feat/cloud-run-concurrency-6

Conversation

@anth-volk

@anth-volk anth-volk commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Fixes #3761

Summary

  • CLOUD_RUN_CONCURRENCY default 4 → 6 (.github/scripts/cloud_run_env.sh), invariant test updated
  • Moves the autoscale trigger from ~2.4 to ~3.6 sustained concurrent requests, reducing the overnight bot-burst instance churn observed 2026-07-21 (18 boots, monitor timeouts + 504s from requests queued behind ~3-min imports)
  • WEB_CONCURRENCY=2 unchanged

Qualification

Draft until the 30-min c6 soak (12 clients, cache-busted, against a no-traffic c6-qual revision) passes its gates: memory p95 < 70%, zero OOM, zero 5xx. Evidence will be appended to docs/migration/history/pr4-stage2-runtime-timing.md before marking ready. (Stage 2 rejected c8 after a worker OOM at 92% memory; concurrency changes require their own soak.)

🤖 Generated with Claude Code

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.03%. Comparing base (8c08b5f) to head (64b3b3a).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3758   +/-   ##
=======================================
  Coverage   80.03%   80.03%           
=======================================
  Files          70       70           
  Lines        4342     4342           
  Branches      809      809           
=======================================
  Hits         3475     3475           
  Misses        648      648           
  Partials      219      219           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anth-volk
anth-volk marked this pull request as ready for review July 21, 2026 19:05
anth-volk and others added 2 commits July 21, 2026 22:32
Cloud Run's autoscaler targets ~60% of containerConcurrency, so c4 spawns
a new instance at ~2.4 sustained concurrent requests — overnight bot
bursts churned 18 instance boots on 2026-07-21, each queueing requests
behind the ~3-min import. c6 moves the trigger to ~3.6 while staying
within the memory envelope (c8 OOM'd in Stage 2; c6 re-qualified by soak,
evidence in docs/migration/history/pr4-stage2-runtime-timing.md).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
30-min 12-client cache-busted soak against no-traffic c6-qual revision:
memory p99 peaked 61% (bar 70%; c8 failed at 92%), zero OOM/worker
restarts, 320/320 requests 200. Gates evaluated server-side (client-side
JSON lost to an operator session exit at soak end — informational only).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@anth-volk
anth-volk force-pushed the feat/cloud-run-concurrency-6 branch from 87ffe11 to 64b3b3a Compare July 21, 2026 19:32
@anth-volk
anth-volk merged commit 8b5af5e into master Jul 21, 2026
10 checks passed
@anth-volk
anth-volk deleted the feat/cloud-run-concurrency-6 branch July 21, 2026 19:39
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.

Cloud Run concurrency 4 triggers scale-out churn under bot bursts

1 participant