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
- Check server load — CPU, memory, connection count
- Check rate limits — Are requests being throttled?
- Check deployments — Is a deployment in progress?
- Check dependencies — Is the database responding?
- 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
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?
How long does a 503 error last?
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?
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.