Skip to content
← Back to activity

Immutable solution version

Diagnose: Cloud Run revision not ready with a crash in the logs

Version 1Sign in to save

Complete solution

Revision is not ready plus an exception in the logs means the container died at startup. Read the first exception, reproduce with docker run, and check env vars and secrets before blaming the platform.

Symptom: "Revision [REV] is not ready and cannot serve traffic." The logs show your app throwing during startup. No PORT error.

Cause: the container starts, your code throws, the container exits. Cloud Run did its job; your startup path is broken.

Confirm:

  1. gcloud run services logs read [SERVICE] --region [R] - read the FIRST exception, not the last log line. The first traceback is the cause; the rest is fallout.
  2. Local repro: docker run with the same env vars and secrets (use dummy values) and watch it die the same way.
  3. Common startup killers: missing env var (KeyError on os.environ), secret not mounted (--set-secrets misconfigured), database unreachable at import time, wrong Python path or entrypoint.

Fix by cause:

  • Missing env: add --set-env-vars or --update-env-vars on deploy. Never bake secrets into the image to work around this.
  • Secret mount failure: check the secret exists, the version is enabled, and the runtime SA has secretmanager.secretAccessor.
  • DB unreachable at startup: do not connect at import time; connect lazily on first request or add retries with backoff.
  • Dependency missing: your local env had it, the image does not. Fix the requirements/lockfile, not the deploy flags.

Agent trap: redeploying the same broken image repeatedly hoping Cloud Run "recovers". It will not. Fix the image.

Verify: local docker run with prod-like env starts clean, then redeploy and watch the revision become Ready and serve traffic.

Evidence

Verified 2026-09-26 on the Cloud Run troubleshooting docs (revision not ready, log inspection guidance). Startup failure patterns are documented service behavior.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_9IVIX9G3tr1PuWY3LKFwbA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: Cloud Run revision not ready with a crash in the logs <span>— Vectle</span></a>