HTTP 503 Service Unavailable (maintenance & overload)

The service is temporarily not taking your request — maintenance, overload, or no healthy backend. Often you should wait and retry.

What 503 is saying

5xx = server-side. 503 is the polite “closed for a bit” signal. Good operators return it deliberately during deploys or when refusing load is safer than melting the database.

HTTP/1.1 503 Service Unavailable
Retry-After: 120
Content-Type: application/json

{"error":"service_unavailable","message":"Try again in 2 minutes"}

503 vs lookalikes

CodeMeansWho should change what
503Unavailable / overloaded / drainingWait; scale; finish maintenance
502Bad gateway / upstream brokenFix upstream process, port, TLS
504Gateway timed outSpeed up upstream or raise aligned timeouts
429You hit a rate limitSlow your client; honor Retry-After
500Unhandled server errorBug in app code

Some CDNs map “origin down” to 521/522/523 — same idea as unavailable, different banners.

Typical causes

Retry-After

Same rules as 429: integer seconds or an HTTP-date. Clients should wait at least that long. If missing, use exponential backoff with jitter and a capped attempt count.

curl -sI https://example.com/api/health
# Look for HTTP/2 503 and Retry-After

Operator checklist

  1. Return 503 (not 500) for planned unavailability; include Retry-After when you know the window.
  2. Health checks should fail soft during drain so the LB stops sending new work.
  3. Capacity: autoscale on queue depth / p99 latency, not only CPU.
  4. Fail fast on broken dependencies (circuit breaker) instead of holding every worker until 504.
  5. Status page + synthetic checks so humans know it is you, not their Wi-Fi.

Client checklist

  1. Honor Retry-After; add jitter.
  2. Treat 503 as transient for idempotent reads; show a calm “try again shortly” UI.
  3. Do not spin a tight retry loop — that worsens overload.
  4. Distinguish 503 (server busy) from 429 (you personally are too chatty).

Kid-friendly sibling: Wirebook — when sites get tired (queues, rate limits, sharing the load).

Related

Cloudflare Error 521 · Cloudflare Error 522 · Cloudflare Error 524 · HTTP 504 Gateway Timeout · 502 Bad Gateway · HTTP 429 Too Many Requests · ETIMEDOUT · net::ERR_CONNECTION_TIMED_OUT · TypeError: Failed to fetch · Anvil HTTP status · Wirebook: when sites get tired

Questions

What does HTTP 503 Service Unavailable mean?

The server or load balancer cannot handle the request right now — maintenance, overload, draining instances, or an open circuit breaker.

What is the Retry-After header on 503?

Seconds (or a date) telling clients how long to wait before trying again. Honor it to avoid making overload worse.

Is 503 the same as 429?

No. 429 is your rate limit / quota. 503 is the service itself unavailable or overloaded for everyone (or for that pool).

How is 503 different from 502 and 504?

502 = bad upstream reply; 504 = gateway timed out waiting; 503 = deliberately or effectively unavailable.

How do I fix 503 as an operator?

Restore healthy backends, finish maintenance, scale out, fix failing health checks, and return Retry-After during planned windows.

Should I retry 503?

Yes for safe GETs, with backoff and jitter. Cap attempts and surface a clear message if it keeps failing.

Published .

Try it

Related guides

Newest guides