Skip to content

HTTP 503 Service Unavailable Error: What It Means and How to Fix It

What the HTTP 503 Service Unavailable error means and how to fix it: maintenance mode, overload, rate limits, Apache mod_proxy, IIS app pools.

Category
Web Servers
Covers
Apache, IIS, Nginx
On this page

An HTTP 503 Service Unavailable error means the server can’t handle your request right now, but expects to be able to later. It’s the server’s way of saying “not now”: it may be overloaded, in maintenance, rate-limiting you, or unable to reach the application behind it.

This guide explains what the 503 status code means, the most common causes, and how to fix it on Nginx, Apache, WordPress, IIS and load balancers. It also shows how to use 503 correctly for planned maintenance.

What Does 503 Service Unavailable Mean?

The HTTP standard (RFC 9110) says a 503 means the server “is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.” The server may send a Retry-After header to say when to try again.

The key word is temporary. A 503 tells browsers, API clients and search engines that the problem should pass, so they should come back later rather than treat the page as gone.

You may see it as:

  • 503 Service Unavailable
  • HTTP Error 503. The service is unavailable. (IIS)
  • 503 Service Temporarily Unavailable (Nginx)
  • Service Unavailable - The server is temporarily unable to service your request due to maintenance downtime or capacity problems. (Apache)
  • Briefly unavailable for scheduled maintenance. Check back in a minute. (WordPress)

503 vs 500, 502 and 504

CodeWhat happened
500 Internal Server ErrorThe application crashed or hit an error. See our 500 guide.
502 Bad GatewayA proxy got an invalid response from the backend. See our 502 guide.
503 Service UnavailableThe server can’t serve the request right now: overload, maintenance, rate limit, or no healthy backend.
504 Gateway TimeoutThe backend took too long to answer. See our 504 guide.

Common Causes of a 503 Error

  1. Maintenance mode: a deployment or CMS update put the site into maintenance and it didn’t come out again.
  2. Traffic spikes or overload: more requests than the server, PHP workers or database can handle.
  3. Rate limiting: Nginx’s limit_req and limit_conn modules reject excess requests with 503 by default.
  4. Backend unreachable through Apache mod_proxy: Apache returns 503 when it can’t connect to the backend application.
  5. No healthy targets behind a load balancer: all servers fail their health checks.
  6. A stopped IIS application pool: IIS returns 503 for every request to that site.
  7. A DDoS or bad-bot flood using up all resources.

Quick Fixes If You’re Visiting the Site

  1. Wait a few minutes and reload. A 503 is meant to be temporary, and most clear up on their own.
  2. Check the site’s status page or social media for maintenance announcements.
  3. Avoid hammering reload: if the server is overloaded, constant refreshing makes it worse, and rate limits may block you longer.
  4. Try a different network if only you seem to be affected. Your IP may be rate-limited.

How to Fix a 503 Error on Your Own Server

Step 1: Find which layer returns the 503

Check the response headers and the error page. The Server header and the page’s branding usually show whether the 503 comes from Nginx, Apache, IIS, a load balancer or a CDN:

curl -sI https://example.com/ | head -15

Then read that layer’s error log:

sudo tail -n 30 /var/log/nginx/error.log
sudo tail -n 30 /var/log/apache2/error.log

Step 2: Take the site out of maintenance mode

WordPress creates a file named .maintenance in the site root during updates and deletes it when they finish. If an update was interrupted, the file stays and every page shows the maintenance message. Delete it:

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

Then re-run the failed update from the dashboard. Other apps have their own switches, for example php artisan up for Laravel. Check your deployment scripts for a maintenance flag that wasn’t removed.

Step 3: Check Nginx rate limits

If the Nginx error log shows lines like these, the 503 comes from your own rate or connection limits:

limiting requests, excess: 20.500 by zone "one", client: 203.0.113.10
limiting connections by zone "addr", client: 203.0.113.10

Review the limit_req settings. Raise rate or burst if real users are being blocked, and return the more accurate 429 Too Many Requests code instead of 503:

limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;

server {
    location / {
        limit_req zone=one burst=20 nodelay;
        limit_req_status 429;
    }
}

See our 429 Too Many Requests guide for more on rate limiting.

Step 4: Check the backend behind Apache mod_proxy

When Apache proxies to an app (Tomcat, Node.js, a Python app) and can’t connect, it returns 503. The log shows:

AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed
AH01114: HTTP: failed to make connection to backend: 127.0.0.1

Start the backend and confirm it’s listening on that port:

sudo systemctl status tomcat
sudo ss -ltnp | grep 8080

Apache may keep a failed backend marked as unavailable for 60 seconds by default (the retry parameter of ProxyPass), so the 503 can last a moment after the backend comes back. On RHEL-based systems, also check that SELinux allows the connection: sudo setsebool -P httpd_can_network_connect 1.

Step 5: Look for overload

Check whether the server is out of CPU, memory or workers:

uptime
free -h
top -o %CPU
  • PHP-FPM: server reached pm.max_children setting in the PHP-FPM log means requests are queueing. See how to fix pm.max_children errors.
  • Database: Too many connections errors mean the app can’t get a connection. See how to fix MySQL error 1040.
  • Bots: check the access log for the top IPs and user agents, and block abusive ones.
sudo awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head

Long-term fixes are caching (a page cache or CDN), more workers or servers, and moving heavy jobs to background queues.

Step 6: Check load balancer health checks

Load balancers return 503 when no healthy target is available. For example, an AWS Application Load Balancer returns 503 when its target group has no registered targets. Check that the targets are registered and healthy, that the health check path returns 200, and that security groups or firewalls allow the health check traffic.

Step 7: Start the IIS application pool

On Windows servers, an HTTP Error 503. The service is unavailable. page usually means the site’s application pool is stopped. IIS stops a pool automatically when its worker process crashes several times in a short period (Rapid-Fail Protection). In IIS Manager, open Application Pools, start the pool, then check the Windows Event Viewer (Application and System logs) for the crash that stopped it. The pool’s identity must also have a valid password if it runs as a specific user.

How to Use 503 for Planned Maintenance

Use a 503 for planned downtime. It tells search engines the outage is temporary, so they don’t drop your pages. Add a Retry-After header (in seconds) to say when to come back. In Nginx:

server {
    listen 80;
    server_name example.com;

    location / {
        add_header Retry-After 3600 always;
        return 503;
    }

    error_page 503 /maintenance.html;
    location = /maintenance.html {
        root /var/www/maintenance;
        internal;
    }
}

Keep maintenance short. A few hours of 503 responses is fine, but if a site keeps returning 503 for more than a couple of days, Google may start to drop URLs from its index.

For the full list of codes and what they mean, see our HTTP status codes list. Guides for other common errors:

Frequently Asked Questions

What does 503 Service Unavailable mean?

It means the server is temporarily unable to handle the request, usually because it’s overloaded, in maintenance, or can’t reach the application behind it.

How long does a 503 error last?

It depends on the cause. Maintenance and traffic spikes usually pass in minutes. If the server sends a Retry-After header, that’s its estimate of when to try again.

Is 503 bad for SEO?

Not for short periods. A 503 is the right code for planned maintenance. Search engines retry later. If the 503 lasts more than a couple of days, pages can start to drop out of the index.

What is the difference between 502 and 503?

502 means a proxy got an invalid response from the backend. 503 means the server is deliberately not serving requests right now, because of overload, maintenance or rate limiting, or because no backend is available.

How do I fix the WordPress “Briefly unavailable for scheduled maintenance” message?

Delete the .maintenance file in your WordPress root folder, then re-run the update that was interrupted.

Conclusion

An HTTP 503 Service Unavailable error means the server is temporarily unable to respond. Visitors should wait a few minutes and try again. For site owners, find the layer that returns it and read its log: a stuck maintenance mode, rate limits, a stopped backend behind Apache, overload, failing health checks or a stopped IIS application pool. And for planned downtime, 503 with a Retry-After header is exactly the right response.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top