« Previous Next »

Thread: Application pool restrictions, recycle, loss of sessions

Last post 01-08-2009 2:27 PM by vicktorus. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 02-23-2007, 8:12 AM

    • JanReilink
    • Not Ranked
    • Joined on 02-23-2007, 1:02 PM
    • Netherlands, the
    • Posts 7

    Application pool restrictions, recycle, loss of sessions

    On one of our web servers we host several hundered web sites (shared hosting), all in their own application pool. We put the following memory restrictions on these pools:
        Maximum virtual memory: 128 MB
        Maximum used memory: 128 MB
    We have been adviced by Erik Bais, Planet Technologies EMEA, to use this model.

    Now we experience that all web sites lose their session within one or two minutes and all application pools keep on recycling with EventID 1077:
        Event Type:    Information
        Event Source:    W3SVC
        Event Category:    None
        Event ID:    1077
        Date:        2/23/2007
        Time:        1:44:20 PM
        User:        N/A
        Computer:    NET3-NL-IIS-83
        Description:
        A worker process with process id of '5140' serving application pool 'domainname.nl' has requested a recycle because it reached its virtual memory limit.  

        Event Type:    Information
        Event Source:    W3SVC
        Event Category:    None
        Event ID:    1077
        Date:        2/23/2007
        Time:        1:43:20 PM
        User:        N/A
        Computer:    NET3-NL-IIS-83
        Description:
        A worker process with process id of '5608' serving application pool 'domainname.nl' has requested a recycle because it reached its virtual memory limit.  

        Event Type:    Information
        Event Source:    W3SVC
        Event Category:    None
        Event ID:    1077
        Date:        2/23/2007
        Time:        1:42:20 PM
        User:        N/A
        Computer:    NET3-NL-IIS-83
        Description:
        A worker process with process id of '16428' serving application pool 'domainname.nl' has requested a recycle because it reached its virtual memory limit.  

    Only Event ID 1077 is shown, no 1009 (http://support.microsoft.com/default.aspx?scid=kb;en-us;919790).
    The application pool uses the same name as the web site and the application pool 'domainname.nl' recycles every minute. And this happens for nearly every application pool. Web sites use classic ASP, ASP.NET, PHP, Access or MySQL databases and so on.  We have not been able to find the reason for these recycles, other than IIS says the application pool reached its virtual memory limit (which we could not verify with the Task Manager or Process Explorer.
    Raising the virtual memory limit to 192 MB has little to no effect.

    Other webservers, where we host serveral websites within a single application pool without any specificly set memory limitations are not experiencing this problem.

    Any help and insights are highly appreciated.

    Kind regards,

    Jan Reilink, VEVIDA Services bv
  • 02-23-2007, 9:54 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,163
    • IIS MVPs

    Re: Application pool restrictions, recycle, loss of sessions

    Seems obvious to me that 128 is just way too low.  Since he gave the advice, what does Erik Bais have to say about this?
  • 04-17-2008, 6:18 AM In reply to

    • acampbell
    • Not Ranked
    • Joined on 04-17-2008, 10:16 AM
    • Posts 1

    Re: Application pool restrictions, recycle, loss of sessions

    Did you ever find an answer to this?

    Thanks,

    Alex 

  • 04-17-2008, 7:04 AM In reply to

    Re: Application pool restrictions, recycle, loss of sessions

    I would question the sizes there - 128MB far too low. (I'll presume your server has plenty of memory say 2GB+)Logically you have to look at this and if 1 app (as it is likely even ona large sharing environment that only 1 at a time will go wrong) is taking up a lot of memory - out of control - you want to shut it down.

    What is a out of control/ a lot of memory though? 128MB out of 4GB total, etc is not a lot you have plenty spare.

    Could a perfectly working ASP app generate 128MB?, yes easily.How is the consultant working out this figure? Get the overall amount of physical memory in the server and divide it roughly by the websites/app pools. That is silly. You will provide a better hosting experience for the customer if their sites go over this limit occasionally then they continue working. If they are out of control - kill them. Obviously if all app pools are running and at near 128MB, etc for each one then the server will be trouble and it is time to look at spreading your load. So in that scenario have a 128MB limit for each doesn't make sense.I would monitor the sites/apps pools without any limits, use performance monitor to see the standard average load per wp.Also it should be noted that if an application is obviously take up to much resources then it should be stopped. Realistically in a modern multi site shared environment 512MB (you could pitch in maybe 384MB or something but remember the default is unlimited and many corp./hosting environments still have the defaults from my experience) is more then enough before you can recycle it. If a customer is using more than this you can recommend more custom solutions.  

    Using automated memory recycling is no replacement for decent monitoring. If it is a shared large hosting environment, and say the memory is double normal usage capacity overall (say up to 70% or something) then you need to look at it. Even if you have the strict 128MB limits for each site/pool you could have a case where you are within limits but still have memory problems. Loose limits like 512MB (in a large shared hosting enviornment - obviously more dedicated solutions can easily have this size wp and you will have different limits) I think should be encouraged just in case. And use strict limits for more problematic pools e.g. a dodgy leak somewhere and if it ever gets up 128MB, 200MB, etc, etc for this pool it will by monitored behaviour always increase forever. then it is encouraged.

    Also consider that the very act of recycling an app pool takes CPU time and effort and delay clients to the new wp so regular recycling is not useful and can make the situation on the server worse.
  • 04-17-2008, 7:08 AM In reply to

    Re: Application pool restrictions, recycle, loss of sessions

    Grrrrr I didn't realise the thread was Feb 2007. I wouldn't have bothered. 

    Damn graveyard thread revivers!

  • 06-29-2008, 7:06 AM In reply to

    • edelweiss
    • Not Ranked
    • Joined on 06-29-2008, 10:45 AM
    • Zurich, Switzerland
    • Posts 1

    Re: Application pool restrictions, recycle, loss of sessions

    Don't worry, you helped us instead :-)

  • 11-23-2008, 11:14 AM In reply to

    Re: Application pool restrictions, recycle, loss of sessions

    Great thread. Don't worry about adding to old posts, people will find it. Like me.

    I'm currently using DiscountASP.Net who limits their app pool to ONLY 100MB. Although I think that is way too low, I want to try and make my rather large application fit within it. On my local box, how do I check to see what size my app pool is? Once I know that I can use a stress tool to simulate multiple visitors.

    Thanks in advanced!!!

    Mike Prestwood

    http://www.prestwood.com

    Mike Prestwood
    Prestwood Software
    http://www.prestwood.com
  • 11-24-2008, 4:18 AM In reply to

    Re: Application pool restrictions, recycle, loss of sessions

    Hi,

    Type the following command at a command prompt and it will tell you which application pools are running on your server and what the Process ID is for each one :

    cscript %SYSTEMROOT%\system32\iisapp.vbs

    You should then be able to find the process using task manager and see how much memory it is currently using.

    Regards, 

     

    Paul Lynch | www.iisadmin.co.uk
  • 01-08-2009, 2:27 PM In reply to

    Re: Application pool restrictions, recycle, loss of sessions

    good tools to know name pool of w3wp.exe process is procexp.  Free software from SysInternals (buy by microsoft, few year ago).  www.sysinternals.com.  You will be redirect to Microsoft technet website.

     So in Process Utilities section, you will find Process Explorer.  No installation !!!!! just run the procesxp.exe.

    Under svchost.exe (of iissvc) you will see all w3wp.exe process.  if you add the column Command line you will be able to see name of the pool at the end of the line.

    You can do lot of things with this Process Explorer.  When you start to use it.  You will never use "windows task manager" again !

    a+

     

    Patrick D. 

     

     

Page 1 of 1 (9 items)
Microsoft Communities