Skip to content

Troubleshooting guide

503 Service Unavailable: causes and fixes

A 503 means the server is reachable but cannot handle the request right now. It is usually temporary, and usually about capacity or health checks.

3 min read10 sectionsUpdated

On this page

Key points

  • 503 is deliberate: a server or proxy decided it cannot serve you right now.
  • The usual reasons: overload, maintenance mode, rate limits or no healthy backends.
  • A Retry-After header tells clients when to try again.
  • Find out whether it is capacity or health before you add servers.

Common causes

CauseHow it showsWhere to look
No healthy backendsLoad balancer returns 503 for every requestTarget group or upstream health status
Overload503s rise with traffic; latency highCPU, worker pools, queue depth
Maintenance modeStatic 503 page, often with Retry-AfterDeploy scripts, maintenance flags
Rate limiting503 (or 429) for heavy clients onlyGateway or WAF rules
Dependency downApp returns 503 from its own health logicDatabase, cache, downstream APIs
Kubernetes: no ready podsIngress returns 503kubectl get endpoints; readiness probes

Diagnosing a 503

bash
# Who sent it? Check headers and Retry-After
curl -sI https://example.com/ | grep -iE 'HTTP/|server|retry-after|via'

# Kubernetes: are any pods ready behind the service?
kubectl get endpoints my-service
kubectl get pods -l app=my-app
kubectl describe pod <pod> | sed -n '/Readiness/,/Events/p'

# Load balancer health (AWS example)
aws elbv2 describe-target-health --target-group-arn "$TG_ARN"

The health-check trap

A common cause of total outages is a health check that is too strict. If the readiness endpoint checks the database, and the database has a brief hiccup, every instance fails its check at once, the load balancer removes them all, and every request gets a 503, even though the app could have served cached pages.

Make readiness checks reflect "can I serve traffic at all", keep liveness checks simple ("is the process responsive"), and use timeouts and failure thresholds that tolerate a short blip.

Fixes

  1. Restore capacity: scale out, restart stuck workers, raise pool sizes if they are the bottleneck.
  2. Fix health checks that remove healthy instances.
  3. Shed load gracefully: serve cached or reduced pages instead of failing everything.
  4. Return Retry-After for planned maintenance and rate limits so clients and crawlers back off correctly.
  5. Find the trigger: a traffic spike, a slow dependency, a bad deploy.

Preventing and catching 503s

  • Alert on the user-facing symptom: an uptime check that fails on 5xx from several regions.
  • Watch saturation before it becomes a 503: worker pools, CPU against limits, queue depth. See the USE method.
  • Announce maintenance on a status page instead of surprising users.
  • Load test before launches; see the launch day checklist.

Frequently asked questions

Does a 503 hurt SEO?

A short 503 with Retry-After is the recommended way to signal maintenance; crawlers will come back. Long-lasting 503s can lead to pages being dropped.

What is the difference between 503 and 429?

429 Too Many Requests is specifically about one client exceeding a rate limit. 503 means the service as a whole cannot handle the request right now.

Check it now, free

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.