Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to use the IIS Debug Diagnostics tool to troubleshoot a memory leak in an IIS process


INTRODUCTION

A memory leak may occur in Microsoft Internet Information Services (IIS) when an IIS process consumes excessive memory. Inetinfo.exe, Dllhost.exe, and W3wp.exe are examples of IIS processes. IIS caches static content and dynamic content. An IIS process normally uses up to 50 percent of the available physical memory. This memory usage metric pertains to each IIS process, not to a total of all IIS processes. You can use this information and Performance Monitor to identify a memory problem.

Additionally, the following symptoms may occur when an IIS process consumes excessive memory:
  • In Windows Task Manager, the Mem Usage column indicates that the process consumes excessive memory.
  • In Performance Monitor, the difference increases between the Private Bytes counter and the Virtual Bytes counter of the Process object.
  • In IIS 6.0 or above, a 32-bit IIS process uses up to 1.3 gigabytes (GB) of virtual memory. If memory recycling is enabled, an event is logged that resembles the following:
  • If memory recycling is not enabled, a 32-bit IIS process uses up to 1.3 GB of virtual memory and eventually stops responding. Then, an event is logged that resembles the following: 

↑ Back to the top


More Information

When an IIS process consumes excessive memory, use the IIS Debug Diagnostics tool to troubleshoot the outstanding memory allocations that caused the memory leak. You have to insert the LeakTrack.dll file and then monitor for the memory leak. As soon as the leak is reproduced, a memory dump file is generated. The memory dump file contains the memory leak information.

To use the IIS Debug Diagnostics tool to troubleshoot an IIS process that consumes excessive memory, follow these steps.

Step 1: Download and install the IIS Debug Diagnostics Tool v1.2

The following files are available for download from the Microsoft Download Center:

IIS Debug Diagnostics v1.2
http://www.microsoft.com/download/en/details.aspx?id=26798 


Step 2: Set up performance logging before the memory leak occurs

  1. Click Start, point to Programs, point to Debug Diagnostics Tool, and then click Debug Diagnostics Tools 1.2.
  2. Click Tools, and then click Options And Settings.
  3. Click the Performance Log tab, click Enable Performance Counter Data Logging, and then click OK.
Note The data sampling interval and the time to start monitoring depend on when the memory leak is reproduced. Because of the log size, make sure that you work with support professionals to obtain the information that you need without overwhelming the server.

Step 3: Create a "Memory and Handle Leak" rule

  1. Click Start, point to Programs, point to Debug Diagnostics Tool, and then click Debug Diagnostics Tools 1.2.
  2. On the Rules tab, click Add Rule.
  3. Click Native (non-.Net) Memory and Handle Leak, and then click Next.
  4. Select the process that has the memory leak, and then click Next.
  5. In the Configure LeakRule dialog box, type or select a warm-up time in the Warm-Up time box.

    Note If the problem is immediately reproduced, click to select the Start memory tracking immediately when rule is activated check box.
  6. Click Configure... in the Userdump Generation section, and make sure that the Auto-create a crash rule to get userdump on unexpected process exit check box is selected. You can also configure after how much memory usage to create a memory dump.
  7. In the Rule Completion box, type or select the time that is required to reproduce the problem.

    Note At the end of the specified time, a dump file is created.
  8. Click Next, and then click Finish.

Step 4: Obtain the data manually

  1. Click Start, point to Programs, point to Debug Diagnostics Tool, and then click Debug Diagnostics Tools 1.2.
  2. Click the Processes tab, right-click the process that you want, and then click Monitor For Leaks.
  3. When the leak is reproduced, right-click the process from step 4b, and then click Create Full Userdump.
Note Notice that the status is Active. Additionally, the Userdump Count counter value increases every time that a memory dump file is created.

Step 5: Stop performance logging after the memory dump file is finished

  1. Click Start, point to Programs, point to Debug Diagnostics Tool, and then click Debug Diagnostics Tools 1.2.
  2. Click Tools, and then click Options And Settings.
  3. Click the Performance Log tab, click Disable Performance Counter Data Logging, and then click OK.

Step 6: Analyze the memory dump file

  1. Click Start, click Run, type the path of the Debug Diagnostics tool, and then click OK.

    Note By default, the Debug Diagnostics tool is located in the C:\Program Files\DebugDiag folder.
  2. On the Advanced Analysis tab, click Add Data Files.
  3. Locate and then click the dump file that you want to analyze, and then click Open.
  4. On the Advanced Analysis tab, click Memory Pressure Analyzers, and then click Start Analysis.
  5. Review the report that is displayed in Microsoft Internet Explorer. A copy of this report is also stored in the \DebugDiag\Reports folder.

Step 7: If you are using custom .dll files, add the "Symbol Search Path For Analysis" path or the "Symbol Search Path for Debugging" path

  1. Click Tools, and then click Options And Settings.
  2. In the Symbol Search Path For Analysis box or in the Symbol Search Path for Debugging box, type the appropriate path, and then click OK.

↑ Back to the top


Keywords: kbiis2007swept, kbinfo, kbentirenet, kbhowto, kb

↑ Back to the top

Article Info
Article ID : 919790
Revision : 4
Created on : 3/30/2017
Published on : 3/30/2017
Exists online : False
Views : 3007