Partager via


Configuring Worker Processes for Idle Timeout

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

Important

This feature of IIS 6.0 is available only when IIS is running in worker process isolation mode.

When it is necessary to conserve system resources by terminating unused worker processes, you can configure a worker process to gracefully close after a specified period of time. You can use this feature to better manage the resources when the processing load is heavy, when identified applications consistently fall into an idle state, or when new processing space is not available. You can also start additional worker processes to replace a worker process that is finished.

Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /User:Administrative_AccountName "mmc %systemroot%\system32\inetsrv\iis.msc".

Procedures

To configure application pool idle timeout

  1. In IIS Manager, expand the local computer, expand Application Pools, right-click the application pool, and then click Properties.

  2. On the Performance tab, under Idle timeout, select the Shutdown worker processes after being idle for check box.

  3. In the minutes box, type the number of idle minutes (with no processing requests) that you want to elapse before shutting down the idle worker process. The default value is 20 minutes.

  4. Click OK.

Optionally, you can configure idle timeout by setting the IdleTimeout metabase property.

To configure application pool idle timeout by using Adsutil.vbs

  1. In the Run dialog box, type cmd, and then click OK.

  2. At the command prompt, type:

    cscript %SystemDrive%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/ApplicationPoolName/IdleTimeout n
    

    Replace n with the number of minutes of idle time to allow before shutting down the idle worker process; the default time-out interval is 20 minutes.

For more information about setting application pool idle timeout, see the IdleTimeout Metabase Property.