Attention: We are retiring the IIS.NET Community Blogs. Learn more >

ASP.NET Tips: What to gather to troubleshoot – part 3 – Crash

Defining an IIS Crash

A Crash in IIS occurs when an IIS process (INETINFO.EXE, DLLHOST.EXE, W3WP.EXE) terminates unexpectedly. A Crash typically happens when there is an Unhandled Exception caused by an Access Violation, Stack Overflow, etc. In these situations, the operating system catches the exception and terminates the process.

Dr. Watson is the default debugger to monitor for process failures in Windows. It can generate a Dump File and a Log File to document a failure in a process. Run drwtsn32 from Start -> Run to view the settings and file location. You can then look at the drwtsn32.log and user.dmp files.

To troubleshoot, we attach a debugger to the process and catch the exception before the operating system.

Troubleshooting Steps

1. Install the Debug Diagnostic tool

http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1286

The default install path is C:\Program Files\DebugDiag and can be changed during the installation.

2. Check Leave Running When Idle (IIS5, IIS5.1) with the following steps:

a) Open Component Services (Start -> Programs -> Administrative Tools -> Component Services)

b) Expand Component Services, expand Computers, expand My Computer, and expand COM+ Applications

c) For any custom packages or web sites/directories:

   i) Right-click and choose Properties

   ii) Go to the Advanced Tab

   iii) Check Leave Running when Idle

   iv) Click OK

3. Uncheck Debug Exception Catching (IIS5 and IIS5.1) with the following steps:

a) Open the MMC for IIS

b) Right-click the computer name and click Properties

c) Click the Edit button for the Master WWW properties

d) Go to the Home Directory tab

e) Click the Configuration button towards the bottom

f) Go to the Process Options tab and uncheck Enable Debug Exception Catching

g) Click OK

4. Disable Health Monitoring (IIS6) with the following steps:

a) Open the MMC for IIS and expand Application Pools

b) Right-click the Application Pool and click Properties

c) Recycling tab: Uncheck all Recycle worker process settings

d) Performance tab: Uncheck Shutdown worker processes after being idle for

e) Health tab: Uncheck Enable rapid-fail protection and Enable pinging

f) Click OK

5. Restart IIS

6. Create a Crash Rule with the following steps:

IIS5

a) Open DebugDiag (Start -> Programs –> Debug Diagnostics Tool 1.1)

b) Select Crash and click Next

c) Select the desired Target Type and click Next

d) Click Breakpoints…

e) Click Add Breakpoint…

f) For Breakpoint Expression, select ComSvcs!ComSvcsExceptionFilter

g) For Action Type, select Full Userdump and click OK

h) Click Save and Close and click Next

i) Click Next for Rule Name. The Userdump Location can be changed here.

j) Select Activate the rule now and click Finish

IIS6

a) Open DebugDiag (Start -> Programs -> Debug Diagnostics Tool 1.1)

b) Select Crash and click Next

c) Select the desired Target Type and click Next

d) Click Next in Advanced Configuration (Optional)

e) Click Next for Rule Name. The Userdump Location can be changed here.

f) Select Activate the rule now and click Finish

Notice the Status is Active. The Userdump Count will increase each time a dump file is created.

7. Analyze the Dump by selecting the Advanced Analysis tab and clicking Add Data Files. When the .dmp is added, select the Crash/Hang Analyzers script and click Start Analysis. When finished, a report (.mht) will be created in C:\Program Files\DebugDiag\Reports and displayed in Internet Explorer with the results and recommendations. If using custom DLL’s, the Symbol path (Tools menu -> Options and Settings -> Symbol Search Path) to the custom PDB files can be added.

8. Compress the Data using DebugDiag (Tools menu -> Create Increment Cabinet File) and analyze this file.

kick it on DotNetKicks.com

No Comments