Configuring Recycling in IIS 6.0

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 running in worker process isolation mode.

In worker process isolation mode, IIS can be configured to periodically restart worker processes assigned to an application pool, allowing you to recycle faulty Web applications. Recycling keeps problematic applications running smoothly, especially when it is not feasible to modify the application code. This ensures that those application pools remain healthy, and that system resources can be recovered.

You can configure worker processes to restart based on elapsed time, number of requests served, scheduled times, or memory usage; or you can configure them to start on demand.

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 a worker process to be recycled after a set elapsed time

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

  2. On the Recycling tab, select the Recycle worker processes (in minutes) check box.

  3. Click the up or down arrow to set the number of minutes you want to elapse before the worker process is recycled.

  4. Click OK.

To configure a worker process to be recycled after a set number of processing requests

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

  2. On the Recycling tab, select the Recycle worker process (in requests) check box.

  3. Click the up or down arrow to set the number of requests to be processed before the worker process is recycled.

  4. Click OK.

To configure a worker process to be recycled at scheduled times

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

  2. On the Recycling tab, select the Recycle worker processes at the following times check box.

  3. Click Add to add a time to the list, Remove to delete a time from the list, or Edit to change an existing time at which the worker process will be recycled.

  4. Click OK.

Note

When recycling is set to occur at scheduled times, it can occur off-schedule if the system time is altered. To avoid unintended changes in scheduled recycling times, recycle the scheduled worker processes right after the system time is changed.

To configure a worker process to be recycled after consuming a set amount of memory

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

  2. On the Recycling tab, under Memory recycling, select the Maximum virtual memory (in megabytes) or Maximum used memory (in megabytes) check box.

  3. Click the up or down arrow to set memory limits.

  4. Click OK.