How to fix 503 Service Unavailable

The server is up but refusing work for now: maintenance mode, an overload, or a limit being hit. How to tell which, and clear it.

1–2 minutes
Engineer beside power equipment in a server room

503 Service Unavailable means the server is reachable but is refusing to handle requests at the moment. Usually it is in maintenance mode, overloaded, or a resource limit has been hit.

If you are visiting the site

A 503 is meant to be temporary. Wait a few minutes and reload.

If you run the site

1. Stuck WordPress maintenance mode

During updates, WordPress creates a file called .maintenance in the site folder. If an update is interrupted, the file stays and every visitor sees Briefly unavailable for scheduled maintenance. Delete it:

rm /var/www/example.com/public/.maintenance

Then rerun the update that was interrupted.

2. PHP-FPM has no free workers

When every PHP worker is busy, new requests queue and eventually fail. Look for this warning:

sudo grep 'max_children' /var/log/php*-fpm.log /var/log/php-fpm/*.log 2>/dev/null

server reached pm.max_children setting means you need more workers (if there is memory to spare), faster pages, or page caching.

3. Hosting account limits

On shared hosting, a 503 or 508 often means the account hit its CPU, memory or process cap. The control panel’s resource usage page shows when. Traffic spikes, bots or a heavy plugin are the usual reasons.

4. Traffic floods and bots

Check the access log for one address or one URL being hit thousands of times:

sudo awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head

Block abusive addresses at the firewall, or put the site behind a CDN that filters bots.

5. A service is deliberately stopped

Load balancers return 503 when no healthy backend is left, and some setups show it while an app restarts. Check the backend services are running.

Something out of date? Software changes. If a step no longer works, tell us and we will check it and update the page.