# 503 Service Unavailable in IIS

> An IIS 503 usually means a stopped or rapid-fail-protected application pool, or a full request queue. Check pool state with PowerShell, then fix the pool settings.

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

Guide IIS Error · HTTP status codes

An IIS 503 usually means a stopped or rapid-fail-protected application pool, or a full request queue. Check pool state with PowerShell, then fix the pool settings.

5 min

read

8

sources

Oct 29, 2026

updated

Scaplet Editorial Team

author

503 5xx · Server error

The short answer

In IIS, a 503 Service Unavailable usually comes from the application pool, not the site. Microsoft documents two triggers: rapid-fail protection removing an application from service after repeated worker process crashes (default 5 within 5 minutes), and the pool's request queue passing its `queueLength` (default 1000). Check the pool's state first, start it, then find why the worker keeps crashing.

1. [Why IIS answers 503 before your app runs](#why-iis-answers-503-before-your-app-runs)
2. [Check it in 2 minutes](#check-it-in-2-minutes)
3. [Start the pool, then stop it crashing again](#start-the-pool-then-stop-it-crashing-again)
4. [When the queue is full, and what your load balancer sees](#when-the-queue-is-full-and-what-your-load-balancer-sees)
5. [Planned downtime on ASP.NET Core](#planned-downtime-on-asp-net-core)

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%2Fiis%20(%22503%20Service%20Unavailable%20in%20IIS%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%2Fiis%20(%22503%20Service%20Unavailable%20in%20IIS%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%2Fiis%20(%22503%20Service%20Unavailable%20in%20IIS%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%2Fiis%20(%22503%20Service%20Unavailable%20in%20IIS%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_Documented causes

## Why IIS answers 503 before your app runs

IIS groups sites into application pools, and each pool has its own request queue and worker process. A 503 means the request was turned away at that layer. Either the pool has no healthy worker to hand it to, or the queue in front of it is already full. Your site code never sees these requests, so application logs stay quiet while the 503s pile up.

Cause

### Rapid-fail protection

Setting and default

`rapidFailProtection` is `true`; `rapidFailProtectionMaxCrashes` is 5; `rapidFailProtectionInterval` is `00:05:00`

What Microsoft says happens

When the crashes reach the maximum within the interval, the WWW service removes all applications in that pool from service

Cause

### Request queue full

Setting and default

`queueLength` is `1000`

What Microsoft says happens

HTTP.sys queues that many requests per pool, then IIS rejects subsequent requests with a 503

Cause

### Pool not started

Setting and default

`autoStart` is `true` by default

What Microsoft says happens

The pool starts when created or when IIS starts, unless it has been set to false or stopped by someone

Cause

### Intentional offline file (ASP.NET Core)

Setting and default

`app_offline.htm` in the app root

What Microsoft says happens

The ASP.NET Core Module stops the app and responds to requests with the file's contents

Request path: where IIS can refuse the request

```
client | v HTTP.sys (request queue for each application pool) | queue longer than queueLength -> 503 v WWW service | pool stopped, or removed from service by | rapid-fail protection -> 503 v worker process (w3wp.exe) -> your application
```

_02_Fix it on your stack

## Check it in 2 minutes

Run the PowerShell lines on the IIS server itself from an elevated prompt with the WebAdministration module available. The `curl` lines work from anywhere. The first one uses a public test endpoint so you can see the output shape.

Public test endpoint: what a 503 looks like to curl
Public test endpoint: what a 503 looks like to curl

```
curl -sS -D - -o /dev/null https://httpbin.org/status/503 | head -n 1 # expected: HTTP/2 503
```

Your own site: status line only (needs your domain)
Your own site: status line only (needs your domain)

```
curl -sS -o /dev/null -w "%{http_code}\n" https://your-site.example/ # 503 means the request was refused before your code ran, or your code returned it
```

On the IIS server: pool state (needs IIS and WebAdministration)
On the IIS server: pool state (needs IIS and WebAdministration)

```
Get-WebAppPoolState -Name "DefaultAppPool" # Value # ----- # Started (or Stopped) %systemroot%\system32\inetsrv\appcmd list apppools # APPPOOL "DefaultAppPool" (MgdVersion:v4.0,MgdMode:Integrated,state:Stopped)
```

The output shapes above follow the Microsoft docs for `Get-WebAppPoolState` and `appcmd list apppools`. If the state is `Stopped`, you are in the next section. If it is `Started` and requests still fail, look at the queue and the app.

**Not run here**I ran only the `httpbin.org` command, since this environment has no IIS. The PowerShell and `appcmd` commands are taken from Microsoft's documentation and were not executed.

_03_How it works

## Start the pool, then stop it crashing again

Starting the pool restores service, but with rapid-fail protection the pool will be pulled again if the cause remains. Treat the start as a pause, not a fix.

Microsoft's example: set the rapid-fail values for a pool

```
appcmd.exe set config -section:system.applicationHost/applicationPools /[name='DefaultAppPool'].failure.rapidFailProtection:"True" /commit:apphost appcmd.exe set config -section:system.applicationHost/applicationPools /[name='DefaultAppPool'].failure.rapidFailProtectionInterval:"00:05:00" /commit:apphost appcmd.exe set config -section:system.applicationHost/applicationPools /[name='DefaultAppPool'].failure.rapidFailProtectionMaxCrashes:"5" /commit:apphost
```

**Loosening rapid-fail protection hides the crash**Raising `rapidFailProtectionMaxCrashes` or turning protection off keeps the pool in service through repeated crashes and hides the cause. Use it only as a bridge while you fix the cause.

1. 01

### Start the pool

Run `Start-WebAppPool -Name "DefaultAppPool"`, or start it from IIS Manager. To start every stopped pool: `Get-ChildItem IIS:\AppPools | where {$_.state -ne "Started"} | Start-WebAppPool`.
2. 02

### Find the crash

Read the application and system event logs on the server for the time of the first 503, and your app's own log. The pool only reaches rapid-fail protection after repeated worker process crashes.
3. 03

### Fix the crashing code or dependency

What crashes the worker depends on your app, so fix it there rather than in IIS settings.
4. 04

### Check whether rapid-fail protection was the trigger

If the pool stops again within minutes of a restart, the crash count reached the maximum inside the interval.

_04_loadBalancerCapabilities values

## When the queue is full, and what your load balancer sees

`queueLength` tells HTTP.sys how many requests to queue for a pool. Past the limit, new requests get a 503. A bigger queue only delays the problem if the app is slow, so look at why workers are busy before raising it. Microsoft's docs also describe `loadBalancerCapabilities`, which controls what a pool does when it cannot start a worker, such as when the queue is full or the pool is in rapid-fail protection.

Value

### `HttpLevel` (default, numeric 2)

Behavior

Returns a 503. A load balancer that is not HTTP aware reads this as the machine being healthy and will not switch nodes

Pick it when

Your load balancer inspects [HTTP status codes](/glossary/http-status-codes)

Value

### `TcpLevel` (numeric 1)

Behavior

Terminates the TCP connection instead of returning a 503

Pick it when

Your load balancer only watches TCP and should fail over

Raise the queue for one pool (same appcmd pattern as Microsoft's rapid-fail example)

```
appcmd.exe set config -section:system.applicationHost/applicationPools /[name='DefaultAppPool'].queueLength:"2000" /commit:apphost
```

_05_Check it

## Planned downtime on ASP.NET Core

For an ASP.NET Core app behind IIS, an `app_offline.htm` file in the app root makes the ASP.NET Core Module shut the app down gracefully and answer with the file's contents until you remove it. The next request after removal starts the app again. Microsoft's example script creates the file, runs the deploy, then deletes it.

The page does not say which status code the offline response carries, so check it with `curl -i` on your own site before you rely on it for crawlers. If it returns 200, search engines can treat your maintenance text as the page.

**Keep it short**A deploy window measured in seconds or minutes is invisible to search. If you need hours, use a real 503 with `Retry-After` from the layer in front of IIS, such as a rewrite rule or your CDN.

Microsoft's manual offline pattern for ASP.NET Core

```
$pathToApp = '{PATH TO APP}' New-Item -Path $pathToApp -Name "app_offline.htm" -ItemType "file" # Provide script commands here to deploy the app Remove-Item -Path $pathToApp\app_offline.htm
```

_06_Explained

## What a 503 from IIS does to crawling

Google says 5xx and 429 responses prompt its crawlers to temporarily slow down, and for Search, already indexed URLs are preserved but eventually dropped if the errors persist. For short emergencies it documents returning 503 or 429 for a couple of hours up to 1-2 days, optionally with `Retry-After`, and warns against longer. A pool stuck in rapid-fail protection returns 503 for every URL on the site until someone starts it, so the site-wide effect arrives quickly. See [5xx server errors](/seo-issues/server-errors-5xx) and the generic [503 Service Unavailable](/errors/http/503) page.

Questions

## Asked a lot.

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

_01_ Why does my IIS site return 503 after a few minutes of working?

Check for rapid-fail protection. By default IIS removes a pool's applications from service when the worker process crashes 5 times within 5 minutes. The cause is whatever keeps crashing the worker, so read the event logs and your app log.

_02_ What is the default IIS queue length?

The `queueLength` property defaults to 1000 requests per application pool. Past that, IIS rejects further requests with a 503, or closes the connection if `loadBalancerCapabilities` is set to `TcpLevel`.

_03_ Can I stop IIS returning a 503 to my load balancer?

You can change what the pool does when it cannot start a worker. `TcpLevel` terminates the TCP connection instead of sending a 503, which suits load balancers that are not HTTP aware. The default `HttpLevel` returns the 503.

Sources · 8

## Every fact, linked and dated.

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

- microsoft.com
- google.com

1. 01 [Microsoft Learn: Application Pool Definitions](https://learn.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/) learn.microsoft.com · checked 2026-11-01
2. 02 [Microsoft Learn: Failure Settings for an Application Pool](https://learn.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/failure) learn.microsoft.com · checked 2026-11-01
3. 03 [Microsoft Learn: Getting started with AppCmd.exe](https://learn.microsoft.com/en-us/iis/get-started/getting-started-with-iis/getting-started-with-appcmdexe) learn.microsoft.com · checked 2026-11-01
4. 04 [Microsoft Learn: Start-WebAppPool](https://learn.microsoft.com/en-us/powershell/module/webadministration/start-webapppool) learn.microsoft.com · checked 2026-11-01
5. 05 [Microsoft Learn: Get-WebAppPoolState](https://learn.microsoft.com/en-us/powershell/module/webadministration/get-webapppoolstate) learn.microsoft.com · checked 2026-11-01
6. 06 [Microsoft Learn: App Offline file (app_offline.htm)](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/app-offline) learn.microsoft.com · checked 2026-11-01
7. 07 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-11-01
8. 08 [Google Search Central: Reduce the Google crawl rate](https://developers.google.com/crawling/docs/crawlers-fetchers/reduce-crawl-rate) developers.google.com · checked 2026-11-01

## Keep learning

[All errors](/errors)

[Learn 503 Service Unavailable HTTP status codes](/errors/http/503) [Related 5xx server errors Status codes and links](/seo-issues/server-errors-5xx) [Read next 503 Service Unavailable in Apache HTTP status codes](/errors/http/503/apache) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 503 errors
[Heroku 503 Service Unavailable](/errors/cdn/heroku-503) [503 Service Unavailable](/errors/http/503) [503 Service Unavailable in Apache](/errors/http/503/apache) [503 Service Unavailable in nginx](/errors/http/503/nginx) [503 Service Unavailable in WordPress](/errors/http/503/wordpress)

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)

Terms on this page
[HTTP status codes](/glossary/http-status-codes)

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
