highFoundationRED#cloud run#revision#503#startup#deploy

Cloud Run revision not serving — 503 / startup failure

gcloud run services describe shows latest revision in state not serving

Likely source:availabilitydeployment

Focused incident mode — strips away everything but this runbook.

Symptoms

  • gcloud run services describe shows latest revision in state not serving
  • HTTP requests return 503 Service Unavailable from the service URL
  • New deploy succeeds but traffic is not routed to the new revision
  • Container logs show startup failure shortly after the deploy

Cloud Run 503 usually means the revision never became Ready. 'Ready=False' messages are golden — read them before guessing, and rehearse a no-traffic deploy when testing a fix.

Evidence to grab

Collect these artifacts before you change anything — they prove (or rule out) each cause.

  • Latest revision serving state

    gcloud run services describe <SERVICE> --region <REGION> --format='value(status.conditions)'
  • Revision logs

    gcloud logging read 'resource.type=cloud_run_revision AND resource.labels.revision_name=<REVISION> AND severity>=ERROR' --limit=50 --format=text

Diagnostic flow

Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.

Guided decision tree is ready.

Steps with commands, expected output, and pass/fail branches.

Ranked root causes

Evidence checklist

  • Revision Ready=False with ContainerStartupFailure / ContainerFailedToStart
  • No steady-state logs, only a startup panic
  • Container exits immediately with nonzero code

Confirm before fixing

gcloud logging read 'resource.type=cloud_run_revision AND resource.labels.revision_name=<REVISION>' --limit=50 --format='value(textPayload)'
READ

Read the full startup log stream

Expected: An error before any listening message

Fix

gcloud run services update <SERVICE> --region <REGION> --image <IMAGE>:<FIXED_TAG> --no-traffic
CHANGE

Deploy a fixed image as a no-traffic revision first

Expected: New revision created without taking traffic

Resolution runbook

Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.

1
gcloud run services describe <SERVICE> --region <REGION> --format='value(status.conditions[?type==Ready].message)'
READ

Read the exact not-serving reason

2
gcloud logging read 'resource.type=cloud_run_revision AND resource.labels.revision_name=<REVISION>' --limit=100 --format=text
READ

Inspect startup logs

3
gcloud run services update <SERVICE> --region <REGION> --port <CORRECT_PORT>
CHANGE

Fix the container port if mismatched

4
gcloud run services update-traffic <SERVICE> --region <REGION> --to-latest
CHANGE

Route traffic to the fixed revision once Ready

Prevention

  • Always deploy with --no-traffic first and use a canary shift.
  • Bind the app to the port Cloud Run expects (default 8080).
  • Set startup CPU boost for cold-start-sensitive containers.
  • Add container port and readiness smoke tests to the CI gate.

Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.