HTTP Error Codes

503 Service Unavailable

HTTP 503

The server is temporarily unable to handle the request, usually due to overload or maintenance.

What It Means

Unlike a 500 error, 503 is explicitly temporary. The server knows it can't handle requests right now but expects to be able to soon. It's often used during maintenance or when overloaded.

Common Causes

  • Server overload — Too many concurrent requests, not enough capacity
  • Scheduled maintenance — Server taken offline for updates
  • Rate limiting — Request limit exceeded
  • Dependency failure — Database or required service is down
  • Deployment in progress — New version being rolled out
  • Auto-scaling lag — Traffic spiked faster than new instances could spin up

The Retry-After Header

Well-behaved 503 responses include a Retry-After header:

HTTP/1.1 503 Service Unavailable
Retry-After: 120

# Or with a date:
Retry-After: Wed, 21 Oct 2025 07:28:00 GMT

This tells clients when to try again. Good monitoring tools and bots respect this header.

How to Debug

  1. Check server load — CPU, memory, connection count
  2. Check rate limits — Are requests being throttled?
  3. Check deployments — Is a deployment in progress?
  4. Check dependencies — Is the database responding?
  5. Check auto-scaling — Are new instances spinning up?

Quick Checks

# Check system load
uptime
top -bn1 | head -5

# Check connection count
ss -s
netstat -an | wc -l

# Check disk space
df -h

# Check memory
free -m

503 vs Other 5xx Errors

500 Bug or crash - something unexpected broke
502 Proxy couldn't reach your app server
503 Server knows it's overloaded/down temporarily
504 Request took too long (timeout)

Prevention

  • Set up auto-scaling before traffic spikes happen
  • Use load balancers to distribute traffic
  • Implement graceful degradation (serve cached content)
  • Use a CDN to reduce origin load
  • Monitor server resources and set up alerts before hitting limits

Know when your service goes unavailable

UptimeSignal monitors your endpoints and alerts you immediately on 503 errors.

Start monitoring free →

Other Error Codes