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
| Cause | How it shows | Where to look |
|---|---|---|
| No healthy backends | Load balancer returns 503 for every request | Target group or upstream health status |
| Overload | 503s rise with traffic; latency high | CPU, worker pools, queue depth |
| Maintenance mode | Static 503 page, often with Retry-After | Deploy scripts, maintenance flags |
| Rate limiting | 503 (or 429) for heavy clients only | Gateway or WAF rules |
| Dependency down | App returns 503 from its own health logic | Database, cache, downstream APIs |
| Kubernetes: no ready pods | Ingress returns 503 | kubectl get endpoints; readiness probes |
# 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
- Restore capacity: scale out, restart stuck workers, raise pool sizes if they are the bottleneck.
- Fix health checks that remove healthy instances.
- Shed load gracefully: serve cached or reduced pages instead of failing everything.
- Return Retry-After for planned maintenance and rate limits so clients and crawlers back off correctly.
- 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.
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
- Website down checker: Is it down for everyone or just me? Check any site now.
Related reading
- 401 Unauthorized: causes, fixes and how it differs from 403: Fix 401 Unauthorized errors: expired tokens, missing Authorization headers, proxies stripping credentials and clock skew, plus how 401 differs from 403.
- 408 Request Timeout: causes and how to fix it: Understand 408 Request Timeout: slow client uploads, idle keep-alive connections and proxy settings, and how it differs from a 504 Gateway Timeout.
- Kubernetes Service has no endpoints: how to fix it: Fix a Kubernetes Service with no endpoints: selector mismatches, unready pods and wrong target ports, with a step-by-step path from Ingress down to the pod.
- 504 Gateway Timeout: causes and fixes: What causes 504 Gateway Timeout errors, how timeouts stack across CDN, load balancer and Nginx, and how to find and fix the slow request.
- 400 Bad Request: what it means and how to fix it: Fix a 400 Bad Request error: oversized cookies, malformed URLs, invalid JSON bodies and proxy rules, with commands to find which layer rejected it.
- 422 Unprocessable Entity: how to fix it: Fix 422 Unprocessable Entity (Unprocessable Content): validation errors in APIs and forms, CSRF tokens in Rails and Laravel, and how to read the error body.
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.