Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > inetserver iis > april 2009 >

inetserver iis : Idle Timeout disabled, still times out


Stefan Barlow
8/15/2006 4:42:01 PM
Using IIS6 on Win2k3, no IIS5 compatilibility mode. I have a large ASP.NET
application with a startup time of 5-10 seconds, and I want to eliminate any
and all idle shutdowns.

We use SQL State Server and the web servers are NLB'ed.

I have created a fresh app pool and disabled any and all recycling and
timeout options in the IIS manager. I double-checked the metabase.xml to be
sure. I have restarted IIS as well.

I moved in one site to the new app pool that is receiving no activity. I
can hit the site, then hit it even as quickly as 15 minutes later, and the
site has gone idle and re-loads. I experience the longer startup time from
the ASP.NET components, and a new "header" is added to the IIS log file. I
know for sure I am hitting the same web server each time.

This is happening on all of our app pools, even though they are set to not
idle timeout both on the app pool and on the global app pool level.

On our busy sites that do not experience more than a few seconds of idle
time, the sites never recycle.

I have checked web.configs, machine.configs, everywhere. I cannot find any
place that would override this setting.

Any ideas?

--
Stefan Barlow
Stefan Barlow
8/15/2006 7:51:51 PM
Update.

Debug is showing now that the application is not really reloading, however
there is still a significant 6-10 second delay between 20 minute idle times,
and there is a header entry into the log file for the first request after
each idle time:

#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2006-08-16 01:34:41
#Fields: date ...

--
Stefan Barlow
MCSD.Net
David Wang [Msft]
8/15/2006 8:51:20 PM
The log file header tells me that w3wp.exe did recycle between those two
time periods for some reason.

If it is unexpected, then you will see an Event Log message detailing why.

If it is expected, you will not see an Event Log message unless you
configure IIS6 to log the reason on recycle. This (like many other "debug"
or "power user" sorts of settings) is not exposed in the UI and has to be
configured by hand.

The property name is "LogEventOnRecycle" and you want to set it to 0xFFFF to
force IIS6 to log the exact reason why it is recycling.

I suggest using %SYSTEMDRIVE%\Inetpub\AdminScripts\ADSUTIL.VBS to tweak the
settings. If you tweak it by hand/XML then make sure you are perfect.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

[quoted text, click to view]

Stefan Barlow
8/15/2006 10:35:29 PM
I set the LogEventOnRecycle value to 255 and restarted IIS. I still
experienced the header stamp in the log with no Event Log entry.

However, a forced app pool recycle did log to the Event Log.

[Global App Pool]
KeyType : (STRING) "IIsApplicationPools"
PeriodicRestartTime : (INTEGER) 1740
PeriodicRestartRequests : (INTEGER) 0
MaxProcesses : (INTEGER) 1
PingingEnabled : (BOOLEAN) True
IdleTimeout : (INTEGER) 900
RapidFailProtection : (BOOLEAN) True
SMPAffinitized : (BOOLEAN) False
SMPProcessorAffinityMask : (INTEGER) 4294967295
StartupTimeLimit : (INTEGER) 90
ShutdownTimeLimit : (INTEGER) 90
PingInterval : (INTEGER) 30
PingResponseTime : (INTEGER) 90
DisallowOverlappingRotation : (BOOLEAN) False
DisallowRotationOnConfigChange : (BOOLEAN) False
OrphanWorkerProcess : (BOOLEAN) False
AppPoolQueueLength : (INTEGER) 4000
CPULimit : (INTEGER) 0
CPUResetInterval : (INTEGER) 5
AppPoolIdentityType : (INTEGER) 2
PeriodicRestartMemory : (INTEGER) 0
PeriodicRestartPrivateMemory : (INTEGER) 0
RapidFailProtectionInterval : (INTEGER) 5
RapidFailProtectionMaxCrashes : (INTEGER) 5
LoadBalancerCapabilities : (INTEGER) 2
LogEventOnRecycle : (INTEGER) 255
AppPoolRecycleTime : (BOOLEAN) True
AppPoolRecycleRequests : (BOOLEAN) True
AppPoolRecycleSchedule : (BOOLEAN) True
AppPoolRecycleMemory : (BOOLEAN) True
AppPoolRecycleIsapiUnhealthy : (BOOLEAN) True
AppPoolRecycleOnDemand : (BOOLEAN) True
AppPoolRecycleConfigChange : (BOOLEAN) True
AppPoolRecyclePrivateMemory : (BOOLEAN) True

[Local App Pool]
KeyType : (STRING) "IIsApplicationPool"
PeriodicRestartTime : (INTEGER) 0
IdleTimeout : (INTEGER) 0
AppPoolQueueLength : (INTEGER) 65535
AppPoolState : (INTEGER) 2
AppPoolAutoStart : (BOOLEAN) True
Win32Error : (INTEGER) 0
LogEventOnRecycle : (INTEGER) 255
AppPoolRecycleTime : (BOOLEAN) True
AppPoolRecycleRequests : (BOOLEAN) True
AppPoolRecycleSchedule : (BOOLEAN) True
AppPoolRecycleMemory : (BOOLEAN) True
AppPoolRecycleIsapiUnhealthy : (BOOLEAN) True
AppPoolRecycleOnDemand : (BOOLEAN) True
AppPoolRecycleConfigChange : (BOOLEAN) True
AppPoolRecyclePrivateMemory : (BOOLEAN) True
David Wang [Msft]
8/16/2006 6:29:19 PM
Hmm. Something odd is going on.

Let's try setting:
LogEventOnRecycle to 0xFFFF
AppPoolQueueLength back to 4000

You don't want a huge queue length because:
1. To queue is already not a good sign
2. To queue a lot in this case means kernel memory is tied up for each

One thing to consider - if an Application Pool setting is invalid, WAS will
simply ignore it and use its hardcoded default - so maybe you have an
invalid value in there.

Or maybe something is periodically changing/re-applying Application Pool
settings (like MOM2005), and since DisallowRotationOnConfigChange is false
by default, any app pool config change causes a recycle of the w3wp.exe

Or maybe your other configured recycling options triggered but there is a
bug causing it to not be logged in the Event Log. You can try turning each
recycle option off until you find the culprit.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

[quoted text, click to view]

satwinder singh
4/13/2009 12:10:43 AM
Hi,
I am facing the the error related to "view mac state" if for a particular period of time (the recycle time) expires then the error appears in my application. Can you help me out on the same

From http://us.mc356.mail.yahoo.com/mc/welcome?.rand=e720bl29t9uin

Posted via DevelopmentNow.com Groups
AddThis Social Bookmark Button