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
iis 6.0recyclew3wpApplication pool restrictionsloss 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.
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.
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.
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 !
37 Posts
Application pool restrictions, recycle, loss of sessions
Feb 23, 2007 08:12 AM|JanReilink|LINK
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
iis 6.0 recycle w3wp Application pool restrictions loss of sessions
Vevida Services - worry-free webhosting: http://vevida.com
9753 Posts
MVP
Re: Application pool restrictions, recycle, loss of sessions
Feb 23, 2007 09:54 AM|tomkmvp|LINK
http://mvp.support.microsoft.com/
1 Post
Re: Application pool restrictions, recycle, loss of sessions
Apr 17, 2008 06:18 AM|acampbell|LINK
Did you ever find an answer to this?
Thanks,
Alex
5187 Posts
MVP
Moderator
Re: Application pool restrictions, recycle, loss of sessions
Apr 17, 2008 07:04 AM|Rovastar|LINK
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.https://www.leansentry.com/
5187 Posts
MVP
Moderator
Re: Application pool restrictions, recycle, loss of sessions
Apr 17, 2008 07:08 AM|Rovastar|LINK
Grrrrr I didn't realise the thread was Feb 2007. I wouldn't have bothered.
Damn graveyard thread revivers!
https://www.leansentry.com/
1 Post
Re: Application pool restrictions, recycle, loss of sessions
Jun 29, 2008 07:06 AM|edelweiss|LINK
Don't worry, you helped us instead :-)
1 Post
Re: Application pool restrictions, recycle, loss of sessions
Nov 23, 2008 11:14 AM|Mike Prestwood|LINK
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
1620 Posts
Re: Application pool restrictions, recycle, loss of sessions
Nov 24, 2008 04:18 AM|Paul Lynch|LINK
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,
MCSE
1 Post
Re: Application pool restrictions, recycle, loss of sessions
Jan 08, 2009 02:27 PM|vicktorus|LINK
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.