Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Performance / November 2006

Tip: Looking for answers? Try searching our database.

How to recover from an OutOfMemoryException in ASP.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rudi - 22 Nov 2006 15:59 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.