Collecting Hang Dumps of IIS 7.0’s W3WP.exe’s

 

Getting hang dumps of IIS/ASP.net processes is easier than ever in Windows Server 2008.   You can create dumps out of taskmanager now. 

However, if you have multiple w3wp.exe's you'll have to do a couple things to figure out which w3wp.exe is which.

Open a command prompt, and enter this command:

 

          %windir%\system32\inetsrv\appcmd.exe list wp

 

This will let you know which pid number matches each application pool.

 

Description: G:\CHAUN\vIISual.net\vIISual.net-PUBLISHED\Debug\IIS7\slowPerf\clip_image012.png

 

 

Open Taskmanager and move to the Processes Tab

 

Expand the View Menu and select “Select Columns…”

 

Description: G:\CHAUN\vIISual.net\vIISual.net-PUBLISHED\Debug\IIS7\slowPerf\clip_image013.png

 

Place a checkmark beside PID (Process Identifier)

 

Description: G:\CHAUN\vIISual.net\vIISual.net-PUBLISHED\Debug\IIS7\slowPerf\clip_image014.png

 

Sort processes by Image name and focus on the w3wp.exe processes please.

 

Description: G:\CHAUN\vIISual.net\vIISual.net-PUBLISHED\Debug\IIS7\slowPerf\clip_image015.png

 

You’ll need to know exactly which w3wp.exe to focus on because we need to make two memory dumps of that specific w3wp.exe while you’re reproducing the problem.  

 

Here is how you’ll trigger the hang dumps when the process seems unhealthy:

 

Description: G:\CHAUN\vIISual.net\vIISual.net-PUBLISHED\Debug\IIS7\slowPerf\clip_image016.png

 

 

 

 

 

 

You can also use DebugDiag 1.2 to make hang dumps of IIS processes on Win2008/ Win2008R2.

(But you can’t use DebugDiag 1.1.)

 

 

You can also use adplus.vbs –hang –p {pid number} command with the Debugging Tools for Windows (either 32bit or 64bit versions).

 

---------------Adplus nuance-------------

The –iis switch doesn’t work for IIS7 like it did in IIS4, 5, and 6.

 

D:\Program Files\Debugging Tools for Windows (x64)>cscript.exe adplus.vbs –hang -iis -quiet

*** ERROR ***

You appear to have IIS Version 7.0 installed.  This has not been tested with the '-iis' switch.  Please run ADPlus again, without the '-iis' switch.

You might want to focus on the pid number…

D:\Program Files\Debugging Tools for Windows (x64)>adplus.vbs -hang -p 4848 -quiet