The server can’t handle requests right now.
When to use it
Maintenance or overload. Include Retry-After if you know when it’s back.
Common causes and fixes
The server is refusing requests on purpose or temporarily: maintenance mode, overload, all backends failing health checks, or a rate limit, since nginx limit_req returns 503 by default. On a load balancer, 503 usually means no registered or healthy targets: check target health, the health check path and port, and whether new deployments pass it. Kubernetes ingress shows the same when a Service has no ready endpoints.
For planned maintenance, return 503 with Retry-After rather than 200 with a maintenance page, so search engines keep your pages indexed; Google tolerates 503 for a day or two, but longer outages can drop URLs. Clients should retry with backoff and honour Retry-After. Keep health checks cheap, so one slow database doesn’t pull every instance out of rotation at once.
Server error (5xx)
5xx codes are server errors: the request may be fine, but the server or something behind it failed. These are worth alerting on.
What it looks like
HTTP/1.1 503 Service UnavailableHow to send it
| Node.js / Express | res.status(503).end() |
|---|---|
| Python / Flask | return '', 503 |
| nginx | return 503; |
How to check it
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/