# HTTP 503 Service Unavailable

**Code:** `503` · **Category:** HTTP · **Seen on:** PHP, WordPress, Kubernetes, AWS

The server is temporarily unable to handle the request — overloaded, in maintenance, or has no healthy backends.

## Meaning

503 signals a temporary condition. Servers may include `Retry-After`. It’s returned by maintenance modes (Laravel `php artisan down`, WordPress updates), by load balancers with no healthy targets, and by servers that have exhausted worker processes.

## Common causes

- Maintenance mode enabled (and not disabled after a deploy)
- No healthy targets behind the load balancer
- All worker processes busy (PHP-FPM `pm.max_children`, Apache `MaxRequestWorkers`)
- Rate limiting returning 503 (Nginx `limit_req` default)
- Dependency outage with a circuit breaker open
- Kubernetes service with no ready pods

## Quick fix

1. Check whether maintenance mode is on (`php artisan up`, delete WordPress `.maintenance` file)
2. Check load balancer target health
3. Look for worker exhaustion in server logs and scale or raise limits
4. Retry after the `Retry-After` interval

## Detailed fix by platform

### PHP

1. PHP-FPM log "server reached pm.max_children setting": raise `pm.max_children` based on available RAM ÷ average process size.

### WordPress

1. Delete the `.maintenance` file in the site root if an update was interrupted.

### Kubernetes

1. `kubectl get endpoints <svc>` — empty endpoints means no ready pods; check readiness probes and pod status.

### AWS

1. ALB returns 503 when the target group has no registered/healthy targets — check health check path and security groups.

## How to diagnose

1. **Maintenance** — Is maintenance mode on?
2. **Capacity** — Are workers/pods saturated?
3. **Health** — Are backends passing health checks?
4. **Dependencies** — Is a downstream service failing?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/http/503-service-unavailable)
