Solved

ASP.NET application pooling issue

Posted on 2007-03-23
4
1,750 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
  • 2
4 Comments
 
LVL 12

Expert Comment

by:craskin
Comment Utility
i'd start by reinstalling .netfx
0
 
LVL 34

Accepted Solution

by:
Dave_Dietz earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now