📖 ~1 min read
Table of contents
Symptom & Impact
Sites return HTTP 503 because WAS disables app pool after repeated crashes.
Environment & Reproduction
Windows Server 2022 build 20348 IIS with unstable app startup path.
Import-Module WebAdministration
Get-ItemProperty IIS:AppPoolsDefaultAppPool -Name failure
Get-WinEvent -LogName Application -MaxEvents 80 | Where-Object Id -in 5011,5057
Root Cause Analysis
Startup failures exceed rapid-fail threshold; root trigger is often config parse errors or dependency crash.
Quick Triage
Review failure counters and app startup logs.
Get-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/applicationPools/add[@name='DefaultAppPool']/failure" -name '.'
Get-ChildItem C:inetpublogsLogFiles -Recurse | Sort LastWriteTime -Descending | Select -First 5
Step-by-Step Diagnosis
Isolate web.config issues and dependency DLL load problems.
appcmd list apppool /name:DefaultAppPool /text:*
appcmd list config /section:system.webServer
Get-WinEvent -LogName 'Microsoft-IIS-W3SVC-WP/Operational' -MaxEvents 100

Solution — Primary Fix
Fix startup fault and adjust rapid-fail only as temporary control.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
Set-ItemProperty IIS:AppPoolsDefaultAppPool -Name failure.rapidFailProtectionMaxCrashes -Value 10
Restart-WebAppPool -Name 'DefaultAppPool'
iisreset /restart

Solution — Alternative Approaches
Use warmup endpoint and preload to avoid cold-start crash loops.
Set-WebConfigurationProperty -Filter '/system.applicationHost/sites/siteDefaults/application' -Name preloadEnabled -Value True
Set-WebConfigurationProperty -Filter '/system.webServer/applicationInitialization' -Name doAppInitAfterRestart -Value True
Verification & Acceptance Criteria
No 503 responses during repeated recycle tests.
for /L %i in (1,1,5) do appcmd recycle apppool /apppool.name:DefaultAppPool
Invoke-WebRequest http://localhost/ -UseBasicParsing
Rollback Plan
Revert rapid-fail threshold to baseline if masking crash root causes.
Set-ItemProperty IIS:AppPoolsDefaultAppPool -Name failure.rapidFailProtectionMaxCrashes -Value 5
Prevention & Hardening
Validate deployment artifacts before swap and enable synthetic startup tests.
appcmd add backup PreDeploy
Invoke-WebRequest http://localhost/health -UseBasicParsing
Related Errors & Cross-Refs
Often seen with malformed web.config transforms and missing VC++ runtimes.
Related tutorial: View the step-by-step tutorial for Windows Server 2022.
View all Windows Server 2022 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Microsoft Learn WAS rapid-fail protection and IIS startup troubleshooting.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.