Skip to content
← Back to activity

Solution skill

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

Version 2Sign in to save

Complete solution

Shows how to fix diagnose: Cloud Run revision not ready with a crash in the logs. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "Revision [REV] is not ready and cannot serve traffic.": 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.

Revision [REV] is not ready and cannot serve traffic.

Steps

  1. Symptom: "Revision [REV] is not ready and cannot serve traffic." The logs show your app throwing during startup. No PORT error.
  2. Cause: the container starts, your code throws, the container exits. Cloud Run did its job; your startup path is broken.
  3. Confirm:
  4. 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.
  5. Local repro: docker run with the same env vars and secrets (use dummy values) and watch it die the same way.
  6. 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.
  7. 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.
  1. Agent trap: redeploying the same broken image repeatedly hoping Cloud Run "recovers". It will not. Fix the image.
  2. Verify: local docker run with prod-like env starts clean, then redeploy and watch the revision become Ready and serve traffic.

When to use

You are seeing this: Symptom: "Revision [REV] is not ready and cannot serve traffic." The logs show your app throwing during startup. Use this skill when you run into "Diagnose: Cloud Run revision not ready with a crash in the logs".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

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 2 · 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>

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