5xx Server Error
Safe to retry
503 Service Unavailable
The server is temporarily unable to handle the request — overloaded or down for maintenance.
What causes it
- Deliberate maintenance mode.
- The worker pool or connection pool is exhausted.
- Autoscaling has not caught up with a traffic spike.
- A dependency (database, cache) is unreachable and the app is failing fast.
How to fix it
- Send a `Retry-After` header — it is the one status where clients genuinely act on it.
- Check pool saturation before adding capacity; a slow query holding connections looks identical to a traffic spike.
- Return 503, not 500, for planned maintenance: search engines will keep the page indexed.
At a glance
- Class
- 5xx Server Error
- Reference
- RFC 9110 §15.6.4
- Standardised
- Yes
- Retry the request?
- Yes, with backoff
Other 5xx server error codes
- 500 Internal Server Error
- 501 Not Implemented
- 502 Bad Gateway
- 504 Gateway Timeout
- 505 HTTP Version Not Supported
- 506 Variant Also Negotiates
- 507 Insufficient Storage
- 508 Loop Detected
- 510 Not Extended
- 511 Network Authentication Required
- 520 Web Server Returned an Unknown Error
- 521 Web Server Is Down
- 522 Connection Timed Out
- 523 Origin Is Unreachable
- 524 A Timeout Occurred
- 525 SSL Handshake Failed
- 526 Invalid SSL Certificate