aspnet_wp.exe was stopped unexpected

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.
 
C

Cliff Harris

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
 
A

Alvin Bruney

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top