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

How to Monitor for 503 Errors

503 errors during traffic spikes mean lost revenue and frustrated users. UptimeSignal monitors your endpoints and alerts you immediately when 503s appear, so you can scale up before the situation worsens. See also: 500 Internal Server Error, 502 Bad Gateway.

Frequently Asked Questions

What causes a 503 Service Unavailable error?
A 503 means the server is temporarily unable to handle requests due to overload or maintenance. Causes include: traffic spikes exceeding capacity, server resource exhaustion (CPU/memory), application worker pool depletion, database connection pool exhaustion, or planned maintenance mode.
How long does a 503 error last?
A 503 is temporary by definition. The server may include a Retry-After header indicating when to try again. Traffic spike 503s may resolve in minutes as load subsides. Maintenance 503s last for the planned window. Resource exhaustion requires intervention -- check CPU, memory, and disk with htop.
Should I return 503 during maintenance?
Yes. Return 503 with a Retry-After header during planned maintenance. This tells search engines the downtime is temporary, preserving your SEO rankings. A persistent 500 error may cause Google to de-index pages, but 503 signals temporary unavailability.
What is the difference between 502 and 503?
502 Bad Gateway means the proxy received an invalid response (backend is broken). 503 means the server is healthy but overwhelmed or in maintenance mode. 502 = backend crash. 503 = backend overloaded. Different root causes require different fixes.
How do I prevent 503 errors from traffic spikes?
Use auto-scaling to add instances under load. Implement rate limiting to prevent abuse. Use a CDN to offload static assets. Add caching (Redis, Varnish) for frequently-accessed data. Scale your database with read replicas and connection pooling. Monitor with UptimeSignal to catch degradation before full outages.

Know the moment your service becomes unavailable

UptimeSignal catches 503 errors and alerts you before your users start complaining.

25 monitors free, unlimited for $15/month.

Related Errors & Resources