Memory LEAK in .NET

G

Guest

Hi All

we've developed (in C#, .NET 1.1) an application that is a server that performs user authentication and communicates with the outside world (the clients) via UDP

After few tests (3 remote client request for authentication every few seconds during about 12 hours) I've discovered that the memory allocation (according to GC.GetTotalMemory()) has reached ~200 MB. When the server started it was about 5 MB. Other monitoring applications show the same 200 MB growth

The serve runs multiple threads, contacting third party DB and performs crypto-functions
I've tried to run it without the DB, but the result is the same

We don't use any native calls and unmanaged code..

THE QUESTION
where should we look for some clue to the answer ? Is there some kind of "BoundsChecker" for .NET

Thanks in advance for any clue/pointer !!

Oleg
 
M

Miha Markic [MVP C#]

Hi Oleg,

You might read this article (NET Allocation Profiler by AutomatedQA):
http://www.automatedqa.com/techpapers/net_allocation_profiler.asp
or/and check Allocation Profiler at
http://www.gotdotnet.com/Community/...mpleGuid=36a3e666-6877-4c26-b62d-bfd7cb3154ac

There are other also...

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Oleg said:
Hi All,

we've developed (in C#, .NET 1.1) an application that is a server that
performs user authentication and communicates with the outside world (the
clients) via UDP.
After few tests (3 remote client request for authentication every few
seconds during about 12 hours) I've discovered that the memory allocation
(according to GC.GetTotalMemory()) has reached ~200 MB. When the server
started it was about 5 MB. Other monitoring applications show the same 200
MB growth.
 
G

Guest

Thanks Miha

I've installed and run AQ profiler.
Something strange happens: I have a SortedList object that contains all the client threads (objects). When the client requests END_OF_SESSION the server removes appropriate client thread from the list.
When no active clients exist clientList.Count returns 0, but the profiler displays few of the unreferenced clients in the heap. They say that the result is taken without forcing GC to free the memory, so I use their function "Force GC" and then take the result once more - and the it is the same - all the unreferenced "dead" clients still in the memory

How could you explain this

Thanks in advance

Oleg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top