How to collect memory dumps using DebugDiag


Introduction

Process memory dumps are very efficient sources of information that are used for troubleshooting web sites, which is the reason they are frequently requested by Sitecore Support.

There are various tools that allow collecting the memory dumps of a specific process, both based on user request (on-demand), as well as based on a specific event (conditional).

The current article describes the way to gather memory dumps using the DebugDiag application.

For other methods of gathering memory dumps, refer to the following article:

DebugDiag Overview And Download Link

DebugDiag is a free tool with rich capabilities that allows to collect and analyze memory dump files. It supports both conditional and on-demand collections of memory dump files using configurable rules that trigger the collection.

The tool also provides a graphical user interface, so does not require exclusively command line usage.

Usually, the DebugDiag installation contains a number of tools such as DebugDiag 2.0 Collection, DebugDiag 2.0 Analysis, DebugDiag 2.0 RuleBuilder (beta). Current article only covers the DebugDiag 2.0 Collection tool.

The tool can be downloaded here:
https://www.microsoft.com/en-us/download/details.aspx?id=49924

Gathering Memory Dump Files - On-Demand

To collect a memory dump file on demand:

DebugDiag will collect a memory dump file and display a message box with the path to the file. Move it to another location before sharing.

Important: Always remember to specify the Full Userdump option. Mini memory dump files contain a limited amount of useful diagnostics information.

Conditional Memory Dump Files Gathering

The DebugDiag tool allows to specify different triggers for collecting memory dump files automatically. It supports the following basic kinds of rules:

To cover the high memory or high CPU usage scenarios, corresponding system performance counters can be used.

This section covers basic examples of the tool usage.

 

  1. Collect a memory dump file when an exception is raised

    This scenario is well covered in the following blog post:
    https://techcommunity.microsoft.com/t5/iis-support-blog/using-debugdiag-to-capture-memory-dumps-on-first-chance/ba-p/377131

    The article content is applicable for DebugDiag 2.0.

  2. Collect a memory dump file when a performance counter exceeds value

    This scenario is covered in the following blog post:
    http://kate-butenko.blogspot.com/2012/06/how-to-gather-dump-with-debugdiag.html

    The article content is applicable for DebugDiag 2.0.

Important: Always remember to specify the Full Userdump option.