Free auditStart free
GuideError · HTTP status codes

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.

5 min
read
8
sources
Oct 29, 2026
updated
Scaplet Editorial Team
author
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
  2. Check it in 2 minutes
  3. Start the pool, then stop it crashing again
  4. When the queue is full, and what your load balancer sees
  5. 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 withChatGPTClaudePerplexityGoogleAI Mode
02Fix 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
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)
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)
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.

03How 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
  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.

05Check 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.

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
06Explained

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 and the generic 503 Service Unavailable page.

Questions

Asked a lot.

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

01Why 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.

02What 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.

03Can 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. 01Microsoft Learn: Application Pool Definitionslearn.microsoft.com · checked 2026-11-01
  2. 02Microsoft Learn: Failure Settings for an Application Poollearn.microsoft.com · checked 2026-11-01
  3. 03Microsoft Learn: Getting started with AppCmd.exelearn.microsoft.com · checked 2026-11-01
  4. 04Microsoft Learn: Start-WebAppPoollearn.microsoft.com · checked 2026-11-01
  5. 05Microsoft Learn: Get-WebAppPoolStatelearn.microsoft.com · checked 2026-11-01
  6. 06Microsoft Learn: App Offline file (app_offline.htm)learn.microsoft.com · checked 2026-11-01
  7. 07How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-11-01
  8. 08Google Search Central: Reduce the Google crawl ratedevelopers.google.com · checked 2026-11-01
Free · 2 minutes

Tools point. Agencies advise. This one ships.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane