Solved

asp.net suspected memory leak issue

Posted on 2013-11-22
3
427 Views
Last Modified: 2013-12-02
Hi,

We are having a  asp.net application deployed on windows 2008 server.
The users are not able to log in to the application all of a sudden. It stays on the login page forever without logging in.
I checked perfmon.exe.
I added counters for private bytes, bytes in all heaps and # current logical threads.

bytes in all heaps and current logical threads remain steady.
I do not see anything for private bytes counter.
Why does it not show any line in for this counter? What does it mean?

if bytes in all heaps remains constant, it might not be a managed memory issue. The problem might be with the unmanaged memory.
How do i detect this issue?

In the asp.net debug mode(development machine), can i see if any objects are not disposed?

Thanks
0
Comment
Question by:shahjagat
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Stephan earned 250 total points
ID: 39671297
To answer your question if you can see it in debug mode: No, unfortunatly not.

When you have a memory leak, your w3wp process will constantly grow. It depends how big the issue is to easily see it.

Memory issues is the hardest piece to fix.

There are some paid products that will really help you.
Take a look at ANTS Memory profiler or JetBrains Memory profiler.
On this there is a trial period on this product to see if it really helps you out.

If you really want to do this without the products you can take a look at this article that will help you get through the process of locating Managed or Unmanaged memory problems.
http://www.codeproject.com/Articles/19490/Memory-Leak-Detection-in-NET
0
 

Author Comment

by:shahjagat
ID: 39681120
stephanonline,


After a restart of the server and recycle of application pools, our application is running.
I am using performance monitor and added a few counters
privatebytes, bytes in all heaps, arrival rate, requests/sec, # of exceptions thrown per sec etc.

Before restart, we made 2 changes
First change was removing some parts of code which we suspected were causing issues.
Second - our server had only 2 GB of hard disk space left. We cleared lots of log files and some backup files.

After restart of the server, the application started to run good.

Is the low disk space a reason for the issue which we experienced? If yes, why did it not affect our other applications which were hosted on the same server?

Do you suggest any other counters in addition to the above mentioned counters that i added to performance monitor? I want to continue monitoring this application for a few weeks.

Thanks
0
 
LVL 16

Expert Comment

by:Stephan
ID: 39683502
Low disk space can be an issue, it mostly depends on what your application does on how it will react to it.

Here you find a list of counters you can use that will help:
http://msdn.microsoft.com/en-us/library/x2tyfybc(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/ekec01h3(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/9tyc2s04(v=vs.110).aspx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question