Thursday, March 22, 2012

System.OutOfMemoryException in asp.net web application

Hi,

We are getting System.OutOfMemoryException exception in an asp.net
application hosted on IIS.
The problem is popping up randomly once every few days.The web server needs
to be restarted as users keep on getting 'Server Application Unavailable'
otherwise.

Could anyone please tell abt the possible causes and solution for this.

Cheers,
JitenOhboy... it could be due to any number of things, without knowing more about
your app it would be very hard to tell what is wrong.
You can wire up your app to capture more info on unhandled exceptions, and
you can also use AdPlus in "hang" mode to take a dump of the W3WP.exe or
ASP_NET.EXE process.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"jiten" wrote:

Quote:

Originally Posted by

Hi,
>
We are getting System.OutOfMemoryException exception in an asp.net
application hosted on IIS.
The problem is popping up randomly once every few days.The web server needs
to be restarted as users keep on getting 'Server Application Unavailable'
otherwise.
>
Could anyone please tell abt the possible causes and solution for this.
>
Cheers,
Jiten
>
>
>


One of the most common culprits is inproc session management. If you store a
lot of data in session variables, consider switching to outproc sessions.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"jiten" <jiten@.discussions.microsoft.comwrote in message
news:398C0A44-231F-40DC-AF02-E8F6965C655A@.microsoft.com...

Quote:

Originally Posted by

Hi,
>
We are getting System.OutOfMemoryException exception in an asp.net
application hosted on IIS.
The problem is popping up randomly once every few days.The web server
needs
to be restarted as users keep on getting 'Server Application Unavailable'
otherwise.
>
Could anyone please tell abt the possible causes and solution for this.
>
Cheers,
Jiten
>
>
>


there are a couple causes:

1) too large session
2) memory "leak" of unmanaged resources. common if you use com object or
don't manage sql connections
3) faulty caching.

start here: http://msdn2.microsoft.com/en-us/library/ms954591.aspx
-- bruce (sqlwork.com)

jiten wrote:

Quote:

Originally Posted by

Hi,
>
We are getting System.OutOfMemoryException exception in an asp.net
application hosted on IIS.
The problem is popping up randomly once every few days.The web server needs
to be restarted as users keep on getting 'Server Application Unavailable'
otherwise.
>
Could anyone please tell abt the possible causes and solution for this.
>
Cheers,
Jiten
>
>
>

0 comments:

Post a Comment