For Debug Diagnostic 1.2, please refer to

http://blogs.msdn.com/b/friis/archive/2012/01/04/debug-diagnostic-1-2-creating-a-rule-in-hang-mode-to-use-the-response-time-of-the-request-etw.aspx

 

 

This article will detail the action plan you can implement to create a rule in Debug Diagnostic 2.0 to automate the dump generation when a hang of the IIS server or of your application is occurring.

 

This action plan can be applied when your W3WP.exe process or your application is hanged and that you are quickly aware of the situation to generate a dump yourself before the issue is gone. A hang of a process means the application is no longer responding within a normal execution time or is even not responding at all but the process is not crashing. This means there is no stop or restart of the process and you won't see any change to the Process ID.

 

Debug Diag can use the execution time of specific requests to generate a dump file.
The main difficulty in this action plan is to decide what is the correct value to generate dumps. If you set a too high value, you'll never get a dump, however, if you set a too low value, you'll get tons of dumps which are may not be relevant to the issue you are trying to resolve.

 

Action Plan

  • Debug Diagnostic 2.0 can be download at the following URL:

http://www.microsoft.com/en-us/download/details.aspx?id=40336

If the operating system is 32-bit, install the 32 bit DebugDiagx86.msi. For 64 bit operating system choose the DebugDiagx64.msi.

  • Execute DebugDiag 2.0 Collection on the IIS server, the wizard "Select Rule Type" loads
  • Select "Performance", then click on "Next >"

  • Select "HTTP Response Times", then click on "Next >"

 

  • Click on "Add URL"
    • Here we'll use the ETW monitoring. This allows us to monitor every incoming requests on the IIS server and to generate a dump if a request is taking more time to be executed than the one specified in the "Timeout after" field
    • In the "Partial URL segment to match" field, use the URL or the page which is representative of the performance issue:
      • A general rule of thumb would be that typically it's the page with the biggest time-taken in the IIS logs file
      • In the example below we'll monitor all ASPX pages
    • In the "Timeout after" field, set a value matching the time-taken but it needs to be less than the maximum time the request can take to be executed

 

  • If you have set a Timeout which is less than 30 seconds, you'll get the following message:
    • It can be ignored, just click on "Yes"

  • Click on "Next >"

                

  • In the "Select Dump Targets" window
    • Click on "Add Dump Target"
    • In the "Target Type" field, choose "Web application pool" and select the Application Pool which is facing the hang issue
    • Click on "OK", and then on "Next >"

  • Set the "Configure UserDump Series" settings as followed and click on "Next >":
    • Note 1: You may need to change these values depending on your scenario.
    • Note 2: Here, we'll generate a Full UserDump every 10 seconds. A maximum of 3 dumps will be generated.

  • Choose a name and a location for dumps file, then click on "Next >"
    • Setting those dumps on another disk than C:\ is possible
    • Please check you have enough available space disk as the dump size will be equal to the memory consumed by the process you are monitoring

  • In the window "Rule Completed", select "Activate the rule now", and then click on "Finish"
    • The rule is now configured and ready to generate dumps

  • Check the status is "Active"
    • If it's not, The "DbgSvc" service is probably not started
    • You can go in "Administrative Tools > Services" and start it
  • When a dump will be generated, you'll see the column "UserDump Count" being incremented

The dumps are located by default in "C:\Program Files\DebugDiag\Logs\Rule_Name".

 

Regards,

 

Xin Jin From GBSD DSI Team