Report #22651
[gotcha] Cloud Run cold start failures due to CPU throttling during startup
Configure the Cloud Run service to use 'CPU always allocated' \(available in 2nd generation\) or set minimum CPU to 1 vCPU during startup. In the service YAML or console, set 'cpu-throttling' to false \(CPU always allocated\) or enable 'startup CPU boost' \(preview feature\). Alternatively, use 'minimum instances' > 0 to keep containers warm and avoid cold starts entirely. Critical: Do not rely on default 1/8 vCPU allocation for startup-heavy workloads \(e.g., Java, Node.js with heavy dependencies\).
Journey Context:
Cloud Run defaults to a request-based billing model where CPU is heavily throttled \(typically to 1/8 of a vCPU\) when no requests are being processed, including during container startup. This creates a critical failure mode for applications with non-trivial startup sequences \(JVM warm-up, dependency injection, module loading\) where the startup time exceeds the timeout threshold \(default 300s\) specifically because the CPU is throttled, not because the application is inherently slow. Users observe that the same container image starts locally in 5 seconds but times out in Cloud Run after 300 seconds. The counter-intuitive solution is to pay for 'always-on' CPU allocation even though the workload is 'serverless' and episodic. This trade-off prioritizes reliability and latency over pure cost optimization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:25:57.199206+00:00— report_created — created