Crash and Hang Diagnostics
When an application pool keeps crashing or the site freezes, a memory dump of w3wp.exe usually shows exactly which code is at fault.
On this page · 5 min · Advanced
On this page
- Learning objectives
- Explanation
- Step-by-step screens
- Code example
- Step by step
- Real-world use
- Common mistakes
- Best practices
- Remember this
- Practice exercise
- Mini quiz
- Related topics
- My notes
- Reading time
- 5 min
- Difficulty
- Advanced
- Updated
- Nov 26, 2026
Related tutorials
Interview questions
Learning objectives#
- Find crash evidence in Event Viewer
- Capture a crash dump
- Capture a hang dump
- Analyse dumps with DebugDiag
Explanation#
Crashes leave traces: Event Viewer → Windows Logs → System, source WAS (event 5011 “A process serving application pool ‘ShopPool’ suffered a fatal communication error”), and Application log event 1000 (Application Error, w3wp.exe, faulting module).
Crash dump: run ProcDump (Sysinternals) attached to the w3wp.exe process with -e to write a full dump when an unhandled exception kills it, or create a Crash rule in DebugDiag Collection for the application pool.
Hang dump: while the site is frozen (requests piling up in Worker Processes → View Current Requests), take two or three dumps 30 seconds apart with procdump -ma.
Open the dumps in DebugDiag Analysis (CrashHangAnalysis) for a readable report — the threads, the exception and the call stacks — or in Visual Studio / WinDbg. For ASP.NET Core, dotnet-dump works too.
Step-by-step screens#
Drawings of IIS Manager in IIS 10 (Windows Server 2019/2022, Windows 10/11). The red numbers match the numbered actions under each picture; names on your computer will differ.
Loading pictures…
Code example: Capture crash and hang dumps with ProcDump#
# Which w3wp belongs to ShopPool?
& "$env:windir\system32\inetsrv\appcmd.exe" list wp
# Crash: wait for the process to die from an unhandled exception
procdump64.exe -accepteula -ma -e 5324 C:\dumps\
# Hang: three full dumps, 30 seconds apart
procdump64.exe -accepteula -ma -n 3 -s 30 5324 C:\dumps\
WP "5324" (applicationPool:ShopPool) [10:42:18] Exception: E0434352.CLR [10:42:18] Unhandled: E0434352.CLR [10:42:19] Dump 1 initiated: C:\dumps\w3wp.exe_261126_104218.dmp [10:42:22] Dump 1 complete: 1,412 MB written in 3.1 seconds
This example is illustrative. Copy or download it and run it in your own environment; the expected output is shown above.
Step-by-step explanation#
- appcmd list wp maps process IDs to pools.
- -e writes a dump on an unhandled exception.
- -ma means a full memory dump.
- -n 3 -s 30 takes three dumps 30 seconds apart for a hang.
Real-world use case#
ShopPool stopped twice a day (rapid-fail protection). A crash dump showed a stack overflow in a recursive pricing method; the fix took ten minutes once the stack was visible.
Common mistakes#
Recycling destroys the evidence. Take a hang dump before restarting.
Full dumps are as large as the process memory. Write them to a data drive with free space.
Best practices#
- Check WAS and Application events first
- Full dumps (-ma)
- Several dumps for hangs
- Store and share dumps securely — they contain data
Remember this#
WAS 5011 = worker process crashed.
procdump -ma -e PID = crash dump.
Hang: several dumps 30 s apart.
Practice exercise#
Your task: Take two full dumps 20 seconds apart of process 4180 into D:\dumps.
Show solution
procdump64.exe -accepteula -ma -n 2 -s 20 4180 D:\dumps\
Mini quiz#
Why take several dumps for a hang?
Want more? Practise all IIS MCQs · IIS interview questions
My notes#
Saved in this browser.