aspnet_wp.exe was stopped unexpected

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

I got the error in event viewer, aspnet_wp.exe was stopped
unexpected, because it consumes too much memory when
running my asp.net application, does anybody know what's
the problem is? Any help are appreciated.
 
The aspnet_wp.exe process is designed to recycle itself (stop and restart)
when it consumes over a certain percentage of the system memory. This is
just to ensure that any memory leaks are occasionally squashed, etc.
Now, this kind of stinks when you have some stuff stored in the Session of a
request, as that is lost (if you are using the InProc Session management,
which is thedefault).
There is no real way to prevent this from happening as far as I know.
However, you can reduce the chances if you do a few things.
First, don't store too much in the session state. I try to only store a few
string or numbers in my session state, and put any other values that I need
to store somewhere else, such as in a DB, or the pages viewstate.
Also, if you need to allow the aspnet_wp.exe process to consume more memory
that it is currently able, you can increase the percentage of the system
memory that it is allowed to take up. This setting can be found in the
machine.config file. (usually in
C:\WINDOWS\Microsoft.NET\Framework\v1.xx.xxx\CONFIG)
Just look for
<configuration>
<system.web>
<process model>
the attribute is "memorylimit". This is a percentage, which is, I beleive
set to 80 by default.

HTH

-Cliff
 
This is really a bug in the framework. The aspnet worker process really does
not give back its memory to the operating system even though garbage
collection occurs. You memory keeps on building and building until it either
kills the server or causes a recycle event. I understand that this bug has
been addressed. I am not hopefully because the same was said for 1.x. Be
vigilant about your memory allocation and code aggressively to prevent
memory build up.

regards
 
Back
Top