# 503 Service Unavailable in Apache

> Diagnose an Apache 503 from the error log: backend marked down by mod_proxy, MaxRequestWorkers, or maintenance mode. Includes configs and a Retry-After setup.

Canonical: https://scaplet.com/errors/http/503/apache

Guide Error · HTTP status codes

Diagnose an Apache 503 from the error log: backend marked down by mod_proxy, MaxRequestWorkers, or maintenance mode. Includes configs and a Retry-After setup.

4 min

read

9

sources

Oct 29, 2026

updated

Scaplet Editorial Team

author

503 5xx · Server error

The short answer

An Apache 503 Service Unavailable usually comes from mod_proxy, not from Apache running out of workers. When a proxied backend is in an error state or all balancer members are busy, mod_proxy returns 503; maintenance rewrites return it on purpose. Read the error log for `disabled connection` or `all workers are busy`, fix the backend, then send `Retry-After` during planned downtime.

1. [Start with the error log line, not the config](#start-with-the-error-log-line-not-the-config)
2. [Fix by cause](#fix-by-cause)
3. [Test the maintenance response and the crawler effect](#test-the-maintenance-response-and-the-crawler-effect)

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F503%2Fapache%20(%22503%20Service%20Unavailable%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F503%2Fapache%20(%22503%20Service%20Unavailable%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F503%2Fapache%20(%22503%20Service%20Unavailable%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F503%2Fapache%20(%22503%20Service%20Unavailable%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_Log message to cause

## Start with the error log line, not the config

RFC 9110 and MDN describe 503 as a temporary condition such as overload or maintenance. In Apache the cause is almost always one of three things, and each leaves a different line in the error log. The general meaning is on [503 Service Unavailable](/errors/http/503).

What the log says

### `<proxy function>: disabled connection for (host:port)` (AH00940)

What it means

mod_proxy found the backend worker unusable and returned 503. A worker in an error state gets no requests until its `retry` timeout expires (default 60 seconds)

Where to fix it

Bring the backend up, then wait for `retry` or lower it on the `ProxyPass`

What the log says

### `all workers are busy. Unable to serve <url>` (AH00934)

What it means

A balancer found no worker free for the request

Where to fix it

Add balancer members or backend capacity

What the log says

### `<proxy function>: failed to acquire connection for (host:port)` (AH00941)

What it means

mod_proxy could not get a connection from the worker's pool

Where to fix it

Check backend connection limits and the pool settings on the `ProxyPass`

What the log says

### `server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting` (AH00484 in event)

What it means

Apache has no free worker thread or process. The docs say extra connections "will normally be queued", up to `ListenBacklog`, so this is a slowdown signal first, not a 503 by itself

Where to fix it

Tune MPM limits, or find what holds workers open

What the log says

### No log line, and the response has `Retry-After`

What it means

A maintenance rule or the application returned 503 on purpose

Where to fix it

Search the config for `R=503` and `ErrorDocument 503`

Pull the likely lines

```
# Path depends on ErrorLog; Debian/Ubuntu: /var/log/apache2/error.log grep -E "disabled connection|all workers are busy|MaxRequestWorkers|failed to acquire connection" /var/log/httpd/error_log | tail -n 20 # Confirm the status and any Retry-After the server sends curl -sSI https://example.com/ | grep -i -E "^HTTP|retry-after"
```

**Check the proxy first**If Apache fronts PHP-FPM, Tomcat, Node or any other backend with `ProxyPass`, test the backend directly with `curl -sSI http://127.0.0.1:PORT/` before touching Apache's own limits. A backend that was down once can keep the worker in an error state for the `retry` period after you restart it.

_02_Fix it on your stack

## Fix by cause

mod_proxy: shorten the error-state wait
mod_proxy: shorten the error-state wait

```
# retry: seconds before Apache sends requests to a worker in error state again # default is 60; 0 means always retry ProxyPass "/app" "http://127.0.0.1:8080/app" retry=5 ProxyPassReverse "/app" "http://127.0.0.1:8080/app"
```

Event MPM: the documented defaults, spelled out
Event MPM: the documented defaults, spelled out

```
# Defaults for threaded MPMs: ServerLimit 16 x ThreadsPerChild 25 = 400 threads. # To go past 16 processes you must raise ServerLimit as well. # Example values only; size them to your RAM, not to this snippet. <IfModule mpm_event_module> ServerLimit 32 ThreadsPerChild 25 MaxRequestWorkers 800 </IfModule>
```

Planned maintenance that answers 503 with Retry-After
Planned maintenance that answers 503 with Retry-After

```
# Needs mod_rewrite and mod_headers RewriteEngine On RewriteCond %{REQUEST_URI} !=/maintenance.html RewriteRule ^ - [R=503,L] ErrorDocument 503 /maintenance.html # "always" adds the header to error responses and keeps it # across internal redirects such as ErrorDocument handlers Header always set Retry-After "3600"
```

In that rule `R=503` is outside the 300-399 range, so Apache drops the substitution and stops rewriting, as if `L` were set. The `RewriteCond` exempts the maintenance page itself so the `ErrorDocument` can be served. Remove the block to end maintenance.

**Do not point ErrorDocument at a full URL**The Apache docs warn that an `ErrorDocument` with a full URL (anything starting `http://`) makes Apache send a redirect, so the client no longer sees the original error code. Use a local path such as `/maintenance.html`, or a quoted message.

_03_How it works

## Test the maintenance response and the crawler effect

Use a 503 maintenance rule when
- Downtime is planned and short, hours or a day or two
- You can send `Retry-After` so crawlers and clients know when to return
- The whole site is affected, not one URL

Do something else when
- A single page is gone for good: use a 410 or a 301, not a long 503
- The backend is just slow: look at [504 Gateway Timeout](/errors/http/504)
- The outage may last many days: Google may drop URLs that keep returning 503

1. 01

### Check status and header

Run `curl -sSI https://example.com/some-page` and confirm `HTTP/1.1 503` and a `Retry-After` value.
2. 02

### Check the page still renders

Open the URL in a browser. You should see `maintenance.html`, not Apache's default error text.
3. 03

### Time-box it

Google's crawl-rate guide says 503 or 429 with a `Retry-After` (seconds or an HTTP date) is the way to slow its crawlers for "a couple of hours, or 1-2 days". It warns against doing this longer, and says that if [Googlebot](/ai-crawlers/googlebot) sees these codes on the same URL for multiple days, "the URL may be dropped from Google's index".
4. 04

### Remove the rule and re-request

After the rewrite block is gone, request the page again and confirm a 200. Google increases the crawl rate again once the error count falls.

Sources · 9

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- apache.org
- github.com
- mozilla.org
- google.com

1. 01 [Apache httpd 2.4: MPM common directives (MaxRequestWorkers)](https://httpd.apache.org/docs/2.4/mod/mpm_common.html) httpd.apache.org · checked 2026-11-01
2. 02 [Apache httpd 2.4: mod_proxy (retry, ProxyPass parameters)](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html) httpd.apache.org · checked 2026-11-01
3. 03 [Apache httpd 2.4 source: modules/proxy/proxy_util.c](https://github.com/apache/httpd/blob/2.4.x/modules/proxy/proxy_util.c) github.com · checked 2026-11-01
4. 04 [Apache httpd 2.4 source: server/mpm/event/event.c](https://github.com/apache/httpd/blob/2.4.x/server/mpm/event/event.c) github.com · checked 2026-11-01
5. 05 [Apache httpd 2.4: RewriteRule flags](https://httpd.apache.org/docs/2.4/rewrite/flags.html) httpd.apache.org · checked 2026-11-01
6. 06 [Apache httpd 2.4: mod_headers](https://httpd.apache.org/docs/2.4/mod/mod_headers.html) httpd.apache.org · checked 2026-11-01
7. 07 [Apache httpd 2.4: core features (ErrorDocument)](https://httpd.apache.org/docs/2.4/mod/core.html) httpd.apache.org · checked 2026-11-01
8. 08 [MDN: 503 Service Unavailable](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/503) developer.mozilla.org · checked 2026-11-01
9. 09 [Google: Reduce the Googlebot crawl rate](https://developers.google.com/crawling/docs/crawlers-fetchers/reduce-crawl-rate) developers.google.com · checked 2026-11-01

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ Why does Apache return 503 when the backend restarts?

mod_proxy marks a failed worker as being in an error state and sends it no requests until its `retry` timeout expires, which defaults to 60 seconds. Set a smaller `retry` on the ProxyPass, or retest after the timeout.

_02_ Does hitting MaxRequestWorkers cause a 503?

Not by itself. The Apache docs say connections over the limit are normally queued, up to the ListenBacklog value, until a worker frees up. You get slow responses and the AH00484 message first. A 503 in front of a backend is more often mod_proxy.

_03_ What is the correct way to show a maintenance page in Apache?

Return 503 with a Retry-After header and serve a local HTML page through ErrorDocument 503, as in the config above. Avoid answering a maintenance window with a 200, because the status then tells crawlers the page is healthy.

_04_ How long can a site return 503 before it hurts search?

Google says not to use 503 for longer than 1-2 days, and that URLs seen with these codes for multiple days may be dropped from the index.

## Keep learning

[All errors](/errors)

[Learn 503 Service Unavailable HTTP status codes](/errors/http/503) [Related 504 Gateway Timeout HTTP status codes](/errors/http/504) [Read next 503 Service Unavailable in nginx HTTP status codes](/errors/http/503/nginx) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 503 errors
[CloudFront 503: Service Unavailable](/errors/cdn/cloudfront-503) [Heroku 503 Service Unavailable](/errors/cdn/heroku-503) [503 Service Unavailable](/errors/http/503) [503 Service Unavailable in IIS](/errors/http/503/iis) [503 Service Unavailable in nginx](/errors/http/503/nginx)

Nearby in errors
[502 Bad Gateway in nginx](/errors/http/502/nginx)

More in 503 Service Unavailable
[503 Service Unavailable in Apache](/errors/http/503/apache) [503 Service Unavailable in IIS](/errors/http/503/iis) [503 Service Unavailable in nginx](/errors/http/503/nginx) [503 Service Unavailable in WordPress](/errors/http/503/wordpress) [503 Service Unavailable on Squarespace](/errors/http/503/squarespace)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
