Hi,
We have an ASP.NET application that can generate reports. However, some
users will request soo much data that the server will throw an
OutOfMemoryException.
We will fix the application so that users can not attempt to get that much
data back.
But I still have the question why ASP.NET does not recover from the
OutOfMemoryException. Initially we get the exception and after some more
failed requests we will get the Server Application Unavailable error. My
understanding is that since the request has been aborted, the memory used by
the request should become 'unreachable' and the Garbage Collector should be
capable of reclaiming the memory. But that does not seem to happen.
Can anyone explain why? We are not putting the DataSet in the session or in
the cache, but yet the memory is not being reclaimed.
Thx.
Rudi
Vadym Stetsyak - 26 Nov 2006 19:36 GMT
Hello, Rudi!
To understand what is happening you can use profiling tool.
For example ClrProfiler. Profiler will give you ablity to see what
objects (actually you will see object type ) are in the memory.
Using this info you can then investigate why this or that object wasn't
GC-ed
You wrote on Wed, 22 Nov 2006 07:59:01 -0800:
R> Hi,
R> We have an ASP.NET application that can generate reports. However,
R> some
R> users will request soo much data that the server will throw an
R> OutOfMemoryException.
R> We will fix the application so that users can not attempt to get that
R> much
R> data back.
R> But I still have the question why ASP.NET does not recover from the
R> OutOfMemoryException. Initially we get the exception and after some
R> more
R> failed requests we will get the Server Application Unavailable error.
R> My
R> understanding is that since the request has been aborted, the memory
R> used by
R> the request should become 'unreachable' and the Garbage Collector
R> should be
R> capable of reclaiming the memory. But that does not seem to happen.
R> Can anyone explain why? We are not putting the DataSet in the session
R> or in
R> the cache, but yet the memory is not being reclaimed.
R> Thx.
R> Rudi
--
With best regards, Vadym Stetsyak.
Blog: http://vadmyst.blogspot.com