Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine if an ASP.NET site has a memory leak

Without using any third-party tools, how can you determine if an ASP.NET application (.NET 3.5) has any memory leaks? I want to make sure that an app that was developed by someone else is running okay. I would assume using performance counters but which one(s) are the right ones to use to see if the app has memory leaks?

like image 709
user31673 Avatar asked Aug 05 '10 02:08

user31673


3 Answers

You want to use:

Debug Diagnostic Tool

Description from Microsoft website:

The Debug Diagnostic Tool (DebugDiag) is designed to assist in troubleshooting issues such as hangs, slow performance, memory leaks or fragmentation, and crashes in any user-mode process. The tool includes additional debugging scripts focused on Internet Information Services (IIS) applications, web data access components, COM+ and related Microsoft technologies.

Free download and instructions on how to use it are all located on the linked page.

This link might also be of use:

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

like image 82
Kelsey Avatar answered Nov 18 '22 08:11

Kelsey


The CLR Profiler (see the section "Identifying Where Your Application Allocates Memory").

like image 25
Travis Heseman Avatar answered Nov 18 '22 08:11

Travis Heseman


If you want to really learn how to use Debug Diagnostic Tool you should read Tess Ferrandes blog, she is an ASP.Net escalation engineer and writes useful articles about how to diagnose common issues in ASP.Net applications with those tools.

Hope it helps!!!

like image 1
Carlos Mendible Avatar answered Nov 18 '22 09:11

Carlos Mendible