[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 463
  • Last Modified:

asp.net suspected memory leak issue

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
shahjagat
Asked:
shahjagat
  • 2
1 Solution
 
StephanLead Software EngineerCommented:
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
 
shahjagatAuthor Commented:
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
 
StephanLead Software EngineerCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now