503 Service Unavailable
Published 18 September 2026
A 503 service unavailable is the odd one out among server errors, and the difference decides what you should do about it. A 500, a 502 and a 504 are all failures. A 503 is frequently a decision. Something decided not to serve you, on purpose, and the useful question is whether that decision was deliberate or a symptom.
What it proves before anything else
The server answered. For a 503 to reach you, the name resolved, a TCP connection opened, TLS negotiated, your request was delivered and a response travelled back. Something is running and healthy enough to compose a reply and hand it to you.
That already rules out a great deal. It is not your network, not your DNS, and not a firewall: none of those produce a numbered HTTP reply. Whatever is wrong is a policy or a capacity decision on their side, made after your request arrived safely.
The distinction that matters: deliberate or failing
| Deliberate 503 | Failing 503 |
|---|---|
Has a Retry-After header | No Retry-After |
| A maintenance page, written by a human | The web server's stock error page |
| Every path returns it, consistently | Intermittent, or only some paths |
| Announced somewhere: status page, banner | Nothing anywhere |
| Ends at a predictable time | Ends when someone notices |
Retry-After is the strongest single tell. A server that tells
you when to come back has been configured by someone who knew this would
happen. Its absence does not prove a fault: plenty of maintenance pages
omit it, but its presence almost always means the 503 is planned.
The wording is a tell too
If the page says "503 Service Temporarily Unavailable", that phrasing is nginx's built-in error page, not something anyone wrote. Apache's default is similar. Seeing the stock wording means the request never reached an application that could have produced a considered response, which usually points at no healthy backend rather than a planned window.
A deliberate maintenance page nearly always says something specific: what is happening, and when it ends. Nobody ships "Service Temporarily Unavailable" on purpose. The HTTP 503 status is the same either way; only the body differs, and the body is where the intent shows.
How long does a 503 last?
The honest answer is that the error itself cannot tell you, with one
exception. If there is a Retry-After header, that is the
answer, and it comes in one of two forms:
Retry-After: 120 # seconds
Retry-After: Fri, 18 Sep 2026 20:00:00 GMT # an HTTP date
Without it, the shape of the outage is the clue. A deliberate maintenance window is typically minutes to a couple of hours and ends cleanly. A 503 from overload comes and goes as traffic rises and falls: you will see it, then not, then see it again. A 503 that is constant for hours with a stock error page is usually something nobody has noticed yet.
What actually causes one
- Maintenance mode. Deliberate. The application is deployed behind a switch that returns 503 while a migration runs.
- Overload and load shedding. Semi-deliberate. The server is protecting itself by refusing work it cannot complete, which is better behaviour than accepting it and timing out.
- No healthy backends. A load balancer with nothing to send traffic to. Common during a bad deploy, and the most likely cause when a site 503s without warning.
- Autoscaling lag. Traffic rose faster than capacity. Resolves itself, usually in minutes.
- Rate limiting at the edge. Some platforms return 503 rather than 429 when they shed traffic: technically sloppy, and common enough to be worth knowing.
- A dependency the app cannot start without. A database that is down can turn every request into a 503 at the application layer.
503, 502 and 504 are three different stories
| Code | What happened | Deliberate? |
|---|---|---|
| 502 | A proxy got an unusable answer from a backend | Never |
| 504 | A proxy waited for a backend and gave up | Never |
| 503 | A server that is running declined to serve you | Often |
The practical difference: a 502 or 504 means something is broken and someone needs to fix it. A 503 may mean exactly what it says, and the right response may be to wait.
If you own the server
- Find out which layer produced it. The load balancer, the web server and the application can all emit a 503, and they mean different things. The error page usually gives it away: a stock nginx page is not the same as your framework's.
- Check whether any backend is healthy. If the answer is none, that is the whole problem and the 503 is the load balancer behaving correctly.
- Send
Retry-Afteron deliberate ones. It costs nothing, it stops clients hammering you, and it is the difference between a maintenance window and an outage as far as anyone outside can tell. - Use 503 for maintenance, not 404 or a redirect. A 503 tells search engines the absence is temporary and to come back. A 404 invites them to drop the page.
If you do not own it
- Read
Retry-Afterand honour it. Retrying sooner makes an overload worse and gets you rate limited on top. - Back off exponentially if there is no header. Immediate retries against a server that is shedding load are part of the problem.
- Check their status page before investigating anything locally. A deliberate 503 is usually announced somewhere.
- Confirm it is universal. The same URL from another network settles in seconds whether this is theirs or something local.
See the headers, not just the code. The
HTTP status checker fetches the URL and
shows the response headers: including Retry-After, which is
the one that tells you whether this 503 was planned. It also says plainly
whether the fault is yours, theirs, or actually the network.
What a 503 is never
- Your browser. Clearing the cache cannot change a server's decision to refuse work.
- Your DNS. You reached the right server: it answered. Flushing changes nothing, and usually changes nothing anyway.
- Your connection. A 503 is a completed round trip in both directions. If the network were the problem you would have no status code at all: a refused connection, a timeout, or no route to host, which are the failures actually worth escalating to a network team.