Configuring Worker Processes for Recycling

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

You can configure worker processes to restart based on one of several options, including elapsed time, number of requests served, scheduled times, and memory usage; or you can configure worker processes to start on demand. In IISĀ 6.0, worker process recycling is available only when IIS is running in worker process isolation mode.

For more information about recycling worker processes, see Running IIS 6.0 as an Application Server.

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 recycle a worker process immediately on demand

  • In IIS Manager, expand the local computer, expand Application Pools, right-click the application pool for which you want to recycle the worker process, and then click Recycle.

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 then click Properties.

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

  3. In the box to the right of Recycle worker processes (in minutes), type the number of minutes that you want to elapse before the worker process is recycled, and then 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 then click Properties.

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

  3. In the box to the right of Recycle worker process (number of requests), type the number of requests to be processed before the worker process is recycled, and then 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 then click Properties.

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

  3. To schedule or adjust the time at which the worker process will be recycled, do one of the following:

    • Click Add to add a time to the list, and then click OK.

    • Click Remove to delete a scheduled time, and then click OK.

    • Click Edit to change an existing time, and then click OK.

Note

When recycling is set to occur at scheduled times, it might occur off-schedule if the system time is altered. To avoid unintended changes in the time that recycling occurs, recycle the scheduled worker processes soon 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 then click Properties.

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

  3. In the box to the right of Maximum virtual memory (in megabytes), type the maximum amount of virtual memory allowed before the worker process is recycled.

  4. Select the Maximum used memory (in megabytes) check box.

  5. In the box to the right of Maximum used memory (in megabytes), type the maximum amount of memory allowed before the worker process is recycled, and then click OK.