Question

I'm trying to disable application pool recycling and changed recycling interval in the app pool configuration to 0. Here's full configuration from .config:

<add name="DefaultAppPool" autoStart="true" managedRuntimeVersion="v4.0">
    <recycling logEventOnRecycle="Time, Memory, IsapiUnhealthy, OnDemand, ConfigChange, PrivateMemory">
        <periodicRestart time="00:00:00">
            <schedule>
                <clear />
            </schedule>
        </periodicRestart>
    </recycling>
</add>

Despite that application is still recycled several times a day which can be seen in the event log:

A worker process with process id of '1584' serving application pool 'DefaultAppPool' was shutdown due to inactivity. Application Pool timeout configuration was set to 20 minutes. A new worker process will be started when needed.

This happens on Azure Windows 2008 R2 VM with IIS 7.5. Is there anything else I need to do to make this setting work?

Was it helpful?

Solution

Possible duplicate of IIS: Idle Timeout vs Recycle and others.

What you are looking for is the idleTimeout which you will find under the process model element in applicationhost.config. Unless you have a strong case I would not recommend disabling the timeout as it is a primary mechanism for releasing unused resources when the site in question is not under load.

If it is idle and shuts down then there is a very small overhead as the new process is spooled up, if this is really an issue then I would suggest investigating some form of persisted cache such disk cache offered by the Application Request Routing IIS Module.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top