ServerIdentity memory leak with IHttpAsyncHandler
Posted
by Anton
on Stack Overflow
See other posts from Stack Overflow
or by Anton
Published on 2010-05-12T22:58:40Z
Indexed on
2010/05/13
16:34 UTC
Read the original article
Hit count: 564
I have a .NET web application that consists of a single HTTP handler class that implements IHttpAsyncHandler. All requests to this handler are handled asynchronously, though some requests are short-lived and some are long-lived (nothing over a few seconds).
The problem is that memory consumption grows over time as requests are handled. All profiling results point to an unbounded growth of String objects held by instances of System.Runtime.Remoting.ServerIdentity. Every String value is different, but they all look similar to:
/dd41c00e_1566_4702_b660_c81cdea18a43/vigefresi5pfv8n0ekddg57z_1154.rem
There is nothing in my application that uses ServerIdentity directly, and unless I am mistaken, the ServerIdentity instances are proportional to the number of incoming requests.
If this is an internal .NET structure, it looks like the CLR is not cleaning up after itself. What could be causing the leak?
UPDATE A little less than half of the String objects are being held by System.Runtime.Remoting. The remaining String objects are being held by System.Runtime.Serialization and look similar to:
+1sgess5rjcrgbmp3kqr6bmv_3474.rem
Also, the problem only seems to occur when lots of simultaneous HTTP web requests arrive.
© Stack Overflow or respective owner