Solved

ASP.NET application pooling issue

Posted on 2007-03-23
4
1,757 Views
Last Modified: 2013-11-07
We have a problem with one of our websites server application pools restarting after every few minutes. The actual error message we are receiving in system logs is: A worker process with process ID of **serving application pool** has requested a recycle because it reached its virtual memory limit....

After further investigation using IIS debugger, we traced the problem to a dll called mscorwks.dll located in the Microsoft framework folder (v2.0.50727) , and found that there is a memory leak.

We are running .NET framework 2 on a multiprocessor server running Windows Server 2003 (Web Edition). The server uses 4 application pools though all other application pools are unaffected as they are running ASP code.

Can anyone help?

---->
mscorwks.dll is responsible for 390.55 MBytes worth of outstanding allocations. The following are the top 2 memory consuming functions:
mscorwks!EEVirtualAlloc+104: 386.56 MBytes worth of outstanding allocations.
mscorwks!EEHeapAlloc+12d: 3.97 MBytes worth of outstanding allocations.
<------
0
Comment
Question by:MancAndy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Expert Comment

by:craskin
ID: 18780194
i'd start by reinstalling .netfx
0
 
LVL 34

Accepted Solution

by:
Dave_Dietz earned 250 total points
ID: 18784265
mscorwks.dll is the .Net runtime - workstation version.

I seriously doubt there is a memory leak in this DLL - if there was then everyone who uses the 2.0 Framework sould have a memory leak.  What you are most likely seeing here is the Framework setting up the Managed Heap and/or some .Net code allocating memory.

In any case, what is the memory recycle limit set to for the application pool that is having a problem?  

I'll say right off the bat that if it is less than 1024MB it's set too low and is likely the cause of the entire problem.  Unless you have a specific reason to have a memory recylce limit I would actually recommend disabling that recycle event entirely - it is a band-aid designed to be used in the case of a known memory leak in code that you can't (or won't) fix.

Also, reinstalling the .Net Framework is not likely to have any impact on this issue.

Dave Dietz
0
 
LVL 1

Author Comment

by:MancAndy
ID: 18791838
Your reccomendation worked.... thanks!

We had the recycling limit set at half a gig. Setting it to 1 gig has removed the recurring errors from the event log completely.

Just a quick question though... should we be configuring the server to use mscorsvr.dll instead (on a machine with the spec I described above)? It's only a small site without much traffic so we didn't think it made any difference. We've been using ASP until recently....

Andy
0
 
LVL 34

Expert Comment

by:Dave_Dietz
ID: 18797735
The big difference in the two versions of the Framework core mainly have to do with how many heaps are used and some changes in garbage collection.

It is actually suggested to use the workstation version if there are issues with garbage collection using too much CPU on multi-proc boxes.

Overall, unless you see a problem I wouldn't worry about it - if it ain't broke and all.....  :-)

Dave Dietz
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question