HTTP 503 Service Unavailable — Retry-After Explained
About HTTP 503 Service Unavailable
HTTP 503 Service Unavailable with Retry-After header tells clients when to retry. The server is temporarily overloaded or in maintenance. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: 503 means the server is alive but cannot handle the request right now. Retry-After header specifies seconds or a date when the service will be available. Different from 500 (server error/bug) — 503 is intentional and temporary. Load balancers return 503 when all backend servers are unhealthy. Used during planned maintenance windows. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: Server under heavy load exceeding capacity. Planned maintenance with server intentionally returning 503. All backend servers behind a load balancer are down. Rate limiting at the infrastructure level. Deployment in progress with rolling restart. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: Check the Retry-After response header for when to try again. If you manage the server, check backend health and scale up resources. Review load balancer health checks — backends may be failing. Check server logs for the underlying cause (memory, CPU, connections). If during deployment, wait for the rollout to complete. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our HTTP Status Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
How is 503 different from 502?
502 Bad Gateway means the server got an invalid response from an upstream server. 503 means the server itself is too busy or in maintenance.
Overview
HTTP 503 Service Unavailable with Retry-After header tells clients when to retry. The server is temporarily overloaded or in maintenance.
Key Details
- 503 means the server is alive but cannot handle the request right now
- Retry-After header specifies seconds or a date when the service will be available
- Different from 500 (server error/bug) — 503 is intentional and temporary
- Load balancers return 503 when all backend servers are unhealthy
- Used during planned maintenance windows
Common Causes
- Server under heavy load exceeding capacity
- Planned maintenance with server intentionally returning 503
- All backend servers behind a load balancer are down
- Rate limiting at the infrastructure level
- Deployment in progress with rolling restart
Steps
- 1Check the Retry-After response header for when to try again
- 2If you manage the server, check backend health and scale up resources
- 3Review load balancer health checks — backends may be failing
- 4Check server logs for the underlying cause (memory, CPU, connections)
- 5If during deployment, wait for the rollout to complete