benjamin perkins, (aka @csharpguitar)

Lab 16: Configuring Failed Request Tracing to take a memory dump

Prerequisites

Setup

LAB

Perform the following to configure Failed Request Tracing to capture a memory dump

  1. Configure a Server Level Failed Request Rule to run when the Status Code = 400-599 (seems to work best when the rule is base on Time Taken)

Configuring Failed Request Tracing to take a memory dump

Figure 1, Configuring Failed Request Tracing to take a memory dump

Configuring Failed Request Tracing to take a memory dump

Figure 2, Configuring Failed Request Tracing to take a memory dump
  1. Open the IIS management console and click on the IIS Server name

  2. Open the Configuration Editor

Configuring Failed Request Tracing to take a memory dump

Figure 3, Configuring Failed Request Tracing to take a memory dump
  1. Click on the … of the (Collection) and set customActionEnabled and enabled to TRUE

Configuring Failed Request Tracing to take a memory dump

Figure 4, Configuring Failed Request Tracing to take a memory dump
  1. Then, Apply the changes

  2. Download and copy ProcDump

a. http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx

b. Copy Procdump.exe (procdemp64.exe) into the c:\windows\system32 directory, create a c:\temp\dumps directory to store the dump

  1. Click on the Failed Request Tracing… link, for the CSharpGuitarBugs website, in the Actions pane and Enable it.

Configuring Failed Request Tracing to take a memory dump

Figure 5, Configuring Failed Request Tracing to take a memory dump
  1. Click on the CSharpGuitarBugs Web Site, then on the Configuration Editor

Configuring Failed Request Tracing to take a memory dump

Figure 6, Configuring Failed Request Tracing to take a memory dump
  1. Click on the … and Add the following

a. customActionExe: c:\windows\system32\procdump.exe

b. customActionParams: -accepteula –ma %1% c:\dumps

c. customActionTriggerLimit: 50

d. path: *

Configuring Failed Request Tracing to take a memory dump

Figure 7, Configuring Failed Request Tracing to take a memory dump
  1. Apply the changes and click on the Search Forums link in the CSharpGuitarBugs website, or with the Time Take rule, click on the View By Manufacturer link…, notice that the %1% is the parameter that passes the PID to Procdump.

Configuring Failed Request Tracing to take a memory dump

Figure 8, Configuring Failed Request Tracing to take a memory dump

Configuring Failed Request Tracing to take a memory dump

Figure 9, Configuring Failed Request Tracing to take a memory dump
  1. A memory dump of the W3WP process is created and placed in the c:\temp\dumps directory. You can now use WindDbg or any other memory dump analysis tool to find out the root cause of the issue.

Configuring Failed Request Tracing to take a memory dump

Figure 10, Configuring Failed Request Tracing to take a memory dump