IIS 6.0 SQL 2005 web application out of memory errors

Posted on 2011-10-25
Last Modified: 2012-05-12
I currently have Microsoft working with me on this case but they are not getting anywhere.  I have a web app written by an outside provider which keeps giving out of memory errors to the users.  Microsoft has installed IIS Debug Diag 1.2 and set up rules that will create a user dump when the memory usage of the w2wp process reaches 800MB of memory usage.  I have been watching the usage and it never hits that 800MB threshold but is still giving out of memory errors to the users.  Some of the errors reported back to me were javascript errors "<font face="Arial" size=2> <p>Microsoft JScript runtime </font> <font face="Arial" size=2>error '800a0007'</font> <p> <font face="Arial" size=2>Out of memory</font> <p> <font face="Arial" size=2>/saveform.asp</font><font face="Arial" size=2>, line 106</font> " which according to some research I did may be tied to the buffering limit but I don't want to alter that without guidance from an expert.  Other errors are systemoutofmemoryexception(s).  I have moved the paging file to a drive without the OS.  Unfortunately on both the IIS and SQL server the person who set it up did not leave much room for growth and they also put the paging file on a disk that is RAID 1 and shared with the OS.  I have been able to maintain 10% free space on the C drive.  The vendor is saying that lack of space is root cause of our issues.  The physical limits, RAM, Processor, never seem to be an issue as this server is newer.  Please advise the best way to attack this.  

Question by:pgreetisada
    LVL 6

    Expert Comment

    To start...

    Check the ApplicationPool Settings.
    By default, it would be configured to recycled every 29 hours... I often change this to recycle every 12 Hours instead or sometimes I just force it to recycle out of normal Office Hours at night.

    It's also better to have a separate ApplicationPool by Web Applications.
    If you have a Web Application with a Web.Config, and under it another folder which also contain a Web.Config, I would recommend to put the sub-folder in a separate ApplicationPool as it causes sometimes unexpected results.

    Go to the AppPool properties, and check the box "recycle worker process" and set in to 12000
    Go to the Performance Tab and check the box "Shutdown worker process..." and set it to 10 minutes.
    What is the value of "Max number of worker processes"? If 1, consider increasing it to 3 to see if that makes a difference. If above 3, consider reducing it...

    On the "Health" tab, check the box "enable rapid-fail protection" and allow 20 errors in 5 mins.

    Change the Startup and shutdown Time Limit to 120 instead of the default of 90.

    On the Identity tab, I would recommend to use a proper Domain Account and not something like "Network Service" if possible.

    Other things to consider would be to check the Windows Desktop Heap Size (in the registry) and to disable Loopback.

    Hope this helps.


    Author Comment

    I will make those changes and let you know the results.  Thanks for the assistance.

    Author Comment

    Jerry, sorry it took so long to return the this but the behavior of the box is flaky and the issue has returned.  I checked the windows Desktop Heap Size and here is the copy from the registry - "%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16"  Is there a downside to changing the 3072 to something like 12228?
    LVL 6

    Accepted Solution

    You could try indeed to change the 3072 to 12228, but I would recommend to first change the 512 value to 1024 at least or you could even try 2048 (no higher). A reboot is required for these values to take effect.


    Assisted Solution

    Jerry, I have passed that on to the developers of this app.  Because I don't expect this to be a lifelong conversation I am going to award the points and thank you for your assistance.

    Author Closing Comment

    We were looking for guidance which we received.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Today I came across an interesting issue that had me pulling my hair out.  I was troubleshooting a new internal web site which uses integrated security instead of anonymous.  When browsing the site from my laptop, I was able to access it with no iss…
    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…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 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

    18 Experts available now in Live!

    Get 1:1 Help Now