DevToolsmith

HTTP 503 Service Unavailable

HTTP 503 Service Unavailable means the server is temporarily unable to handle requests, usually overload or maintenance. The server failed to fulfil a valid request. The problem is on the server side.

Class
5xx Server error
Standard
RFC 9110
Cacheable by default
No
Safe to retry
Yes, after the delay in the Retry-After header if present, otherwise with exponential backoff
Go constant
http.StatusServiceUnavailable

What HTTP 503 means

The server is up but can’t serve right now: it is overloaded, in maintenance mode, or has no healthy backends. Unlike 500, the condition is expected to be temporary. Include Retry-After so clients and crawlers know when to come back. Google treats short periods of 503 as temporary and doesn’t drop pages.

How to fix a 503 error

  • Kubernetes ingresses return 503 when a Service has no ready pods: check kubectl get endpoints.
  • Use 503 with Retry-After for planned maintenance pages, never 200 or 404.
  • Autoscaling lag and exhausted worker pools cause 503s under traffic spikes.

Retrying

Yes, after the delay in the Retry-After header if present, otherwise with exponential backoff.

Example response

HTTP/1.1 503 Service Unavailable
Date: Wed, 21 Oct 2026 10:30:00 GMT
Retry-After: 120
Content-Type: application/json

How to return 503

Node.js (Express)
res.status(503).json({ error: 'Service Unavailable' });
Python (FastAPI)
from fastapi import HTTPException

raise HTTPException(status_code=503, detail="Service Unavailable")
Go (net/http)
http.Error(w, http.StatusText(http.StatusServiceUnavailable), http.StatusServiceUnavailable)
nginx
location /private/ {
    return 503;
}

Related status codes

Other 5xx status codes

500 Internal Server Error · 501 Not Implemented · 502 Bad Gateway · 504 Gateway Timeout · 505 HTTP Version Not Supported · 507 Insufficient Storage · 508 Loop Detected · 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

See the full list of HTTP status codes.

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What does HTTP 503 Service Unavailable mean?

HTTP 503 Service Unavailable means the server is temporarily unable to handle requests, usually overload or maintenance. The server is up but can’t serve right now: it is overloaded, in maintenance mode, or has no healthy backends. Unlike 500, the condition is expected to be temporary. Include Retry-After so clients and crawlers know when to come back. Google treats short periods of 503 as temporary and doesn’t drop pages.

How do I fix HTTP 503?

Kubernetes ingresses return 503 when a Service has no ready pods: check kubectl get endpoints. Use 503 with Retry-After for planned maintenance pages, never 200 or 404. Autoscaling lag and exhausted worker pools cause 503s under traffic spikes.