Web-application has very high memory usage compared to .NET total in dotMemory

469 Views Asked by At

The following image shows very well my problem.

I have an application that just eats up all the memory it can get hold of. The snapshots in the images was taken over a 5-10 minutes timespan. In the last snapshot I tried enforcing GB though dotMemory.

Over the weekend it ate al 60Gb of memory available on the server, the IIS restarted the process and then everything went back to the application starting at 1Gb and then eating its way up to 60Gb again.

enter image description here

The .NET total and .NET used seems to keep grow a little, but not as much as the applications total memory consumed.

Looking at the comparison between the snapshots "System" seems to be the namespace that hugs all the memory. Its far ahead from number two "Microsoft".

enter image description here

Expanding the "system" pane gives me the following view.

enter image description here

How would I go about the analyze this further? When I try looking at the "Key Retention Paths" I get the following which doesn't seem to help me much futher right now.

enter image description here

I have played around with dotMemory before, but I have never experienced something like this before. Normally I can quickly find some of my own namespaces and through that narrow it down to where in my code I have forgotten to dispose something.

I tried looking up other questions, but none of them seemed to have the same situation as I. Please do feel free to point me in the direction of another question if you know about one I haven't found yet.

1

There are 1 best solutions below

1
On

All the memory in your snapshot are Managed memory. You have a huge memory leak inside native code of your application. Some Collection or XML objects are kept in memory, then keep some native memory.

In dotTrace you can't see who's retain your native memory (yet). You can do this with ANTS Memory Profiler. Or Deleaker for native part.