[ACCEPTED]-How to disable the application pool idle time-out in IIS7?-application-pool

Accepted answer
Score: 188

Yes, setting the idle timeout value to zero 17 will disable idle timeouts.

Oddly this isn't 16 documented in the MS docs but my evidence 15 for this arises from:

  • IIS Settings Schema

    If 14 you have a look at the IIS settings schema 13 in:


    The schema definition for idleTimeout under

    <sectionSchema name="system.applicationHost/applicationPools">

    it 12 looks like:

    <attribute name="idleTimeout" 

    If you look at the validationParameter attribute 11 we see a range of 0 to 2592000 seconds (the 10 ,60 specifies the granularity of the setting, in 9 this case the value must be divisable by 8 60 [one minute]).

    If you see a starting permissible 7 value of 0 then that usually indicates the 6 setting can be disabled.

  • IIS7 Application Pool Idle Time-out Settings

    Brad Kingsley is 5 the founder and CEO of OrcsWeb who are a 4 fairly well known, respected and trusted 3 Microsoft hoster and Gold Partner.

  • Then there's 2 also the empirical evidence of the fact 1 that it "just works".

Score: 12

Great answer! thanks Kev!

A small update: the 16 URL you posted has moved and it is now: http://bradkingsley.com/iis7-application-pool-idle-time-out-settings/

I 15 was wondering if there is a reason why this 14 is not the default, and if there might be 13 a performance impact for keeping the application 12 pool open for too long. Well, keeping it 11 up when it is idle will not cause you more 10 trouble than not recycling it when there 9 is traffic and no idle time. If you are 8 worried about memory leaks or other resource 7 leaks, there is a setting for forcing recycling 6 based on time/number of requests since last 5 recycle/memory consumption. Here is the 4 documentation for it:


I am going to set my 3 server to no recycle on idle (idleTimeout=0), and 2 recycle every 24 hours: Recycling > Regular 1 Time Interval = 1440

Score: 2
Import-Module WebAdministration

$pools = Get-ChildItem iis:\apppools

foreach ($pool in $pools)
$poolname = $pool.Name

Set-ItemProperty IIS:\AppPools\$poolname -name processModel -value @{idletimeout="20"}
Set-ItemProperty IIS:\AppPools\$poolname -name processModel -value @{idletimeoutaction="Suspend"}
set-ItemProperty IIS:\AppPools\$poolname -Name Recycling.periodicRestart -Value @{time="0"} 
set-ItemProperty IIS:\AppPools\$poolname -Name Recycling.periodicRestart.schedule -Value @{value="02:00:00"} 
Set-ItemProperty IIS:\AppPools\$poolname -name Recycling -value @{logEventOnRecycle="Time, Requests, Schedule, Memory, IsapiUnhealthy, OnDemand, ConfigChange, PrivateMemory"} 

Write-Host "Updated $poolname settings" 


More Related questions