Software

503 Service Unavailable With Server-Side Checks

503 Service Unavailable means the server cannot handle the request right now: maintenance or overload. Both reproduced, with Retry-After and log output.

503 Service Unavailable means the server is temporarily unable to handle the request, usually because it is down for maintenance or overloaded. It is a server-side problem: as a visitor, wait and retry. As the operator, find out whether the 503 comes from your application, a load balancer with no healthy backends, or a deliberate maintenance mode, and send a Retry-After header so clients know when to come back.

Two causes, reproduced

We built a test server with a maintenance route and a route that can handle only two requests at a time.

Planned maintenance:

$ curl -i http://127.0.0.1:9201/maintenance
HTTP/1.1 503 Service Unavailable
retry-after: 120
{"error":"maintenance","detail":"back at 14:00 UTC"}

Overload: four requests sent at the same moment to a route with a capacity of two, each taking 0.8 s:

req3 503
req4 503
req2 200
req1 200

[app] GET /api/slow -> 503 overloaded
[app] GET /api/slow -> 503 overloaded
[app] GET /api/slow -> 200
[app] GET /api/slow -> 200

The two 503s came back immediately; the two accepted requests finished 0.8 s later. Rejecting fast is the point: a server that queues everything under overload ends up timing out every request instead of serving some of them.

Step throughHow each case unfolds
1 / 6
  1. maintenanceStep 1. Operator enables maintenance mode

    The app, or the load balancer, starts answering every request with 503 and Retry-After: 120 instead of serving pages.

  2. maintenanceStep 2. Clients back off

    Well-behaved clients wait the Retry-After period. Google documents that 5xx responses make its crawlers temporarily slow down, while already indexed URLs are kept for a while; that is why a short 503 is the right code for maintenance, and a 200 error page or a 404 is not.

  3. maintenanceStep 3. Service returns

    Maintenance mode is switched off and the next retry gets 200.

  4. overloadStep 4. Traffic exceeds capacity

    More requests arrive than the server can process concurrently: a traffic spike, a slow database, or too few instances.

  5. overloadStep 5. Excess requests are shed with 503

    The server rejects what it cannot handle immediately, with a short Retry-After, keeping latency normal for the requests it accepts.

  6. overloadStep 6. Load balancer view

    If every backend fails its health check, the load balancer itself answers 503 with no application log at all. That is the signature of a 503 that never reached your code.

Find the source of a 503

  1. Who sent it? Look at the response body and headers. A branded error page or a server: header from your CDN or load balancer means the request never reached the application.
  2. Application logs: if they show the 503s, look at what the app was waiting for: database connections, worker pool, a dependency.
  3. Load balancer health checks: if all targets are unhealthy, the balancer returns 503. Check the health-check path still returns 200 after the last deploy.
  4. Resources: CPU, memory, open connections and the process count at the time of the errors.
  5. Recent changes: deploys, config changes or a dependency outage often line up with the first 503.

503 vs 500 vs 502 vs 504

CodeMeaning
500 Internal Server Errorthe application failed while handling the request
502 Bad Gatewaya proxy got an invalid response from the upstream server
503 Service Unavailabletemporarily unable to handle requests (overload or maintenance)
504 Gateway Timeouta proxy gave up waiting for the upstream server

For visitors

Reload after a minute or two; check the site’s status page or social accounts. If only you get 503 for a long time, try another network: some sites rate-limit by IP address and answer 503 (or 429) when a single address sends too much.

Webhook providers treat a 503 from your endpoint as a failed delivery and retry later, as described in what a webhook is. If the request itself is malformed, the server should answer 400 instead; see the 400 Bad Request guide.

Sources

  1. RFC 9110: HTTP Semantics, 503 and Retry-After — IETF
  2. 503 Service Unavailable — MDN
  3. How HTTP status codes affect Google's crawlers — Google Search Central
  4. Retry-After — MDN

How we made this

Reproduced in a local lab. A Node.js test server on localhost returned 503 for a maintenance route (Retry-After: 120) and for requests beyond a concurrency limit of two. We sent one maintenance request and four simultaneous requests with curl; responses and log lines are quoted verbatim. Which two of the four requests succeed depends on arrival order.

Performed by Claude, an AI assistant working in the BinConvert repository (macOS, Node.js 25.8.2, curl 8.7.1), November 16, 2026.

This article was drafted with AI assistance. Every example, calculation and command output on this page was re-run or checked before release; the maintenance and overload requests were re-sent and the results compared. Review: automated test suite and source check, November 16, 2026.

Spotted an error? Tell us and we will correct it.

Copied to clipboard!