Delen via


Determining When to Use Worker Process Recycling

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

Consider the following general guidelines when you decide whether to enable worker process recycling. The optimal solution is to fix the application that is causing the problem. However, recoding is not always an option, especially in cases when other application code is running that cannot be modified.

Consider using worker process recycling under the following circumstances:

  • Your Web server is hosting problematic applications that you cannot fix.

  • An application is failing unexpectedly or experiencing undetermined or intermittent problems.

  • An application is leaking memory as a result of performance monitoring.

  • You have previously implemented a temporary reset solution, such as scheduled execution of the IISReset command-line utility.

You might not need to use worker process recycling under the following circumstances:

  • Your Web server is hosting a Web site that contains only static content and no custom ISAPI applications.

  • Your Web server is hosting an application that has already been thoroughly tested and does not suffer from memory or resource allocation problems.

To effectively use worker process recycling, review the criteria on which recycling can be based, as listed in the following table.

Recycle Method Description When to Use

ISAPI request

Recycles the worker process based on a request from an ISAPI in the application pool.

Use this method when ISAPI extensions can declare themselves unhealthy.

Elapsed time

Recycles the worker process based on a time frame that is specified by the user in minutes.

Use this method when applications have problems running for extended time periods.

Number of requests

Recycles the worker process when the number of Hypertext Transfer Protocol (HTTP) requests exceeds a certain threshold.

Use this method when applications are failing based on the number of requests they receive.

Scheduled times

Recycling can occur at specified times within a 24-hour period.

Use this method when conditions are similar to the conditions for elapsed time.

Virtual memory (reserved plus used)

Recycles the worker process when the worker process virtual memory reaches a certain threshold.

Use this method when the memory heap becomes highly fragmented, which is caused by applications reserving memory multiple times. The symptom is a steady increase in virtual memory.

Used memory

Recycles the worker process when the memory that is used by the W3wp.exe process reaches a certain threshold.

Use this method when some applications have memory leaks.

Demand

Recycling happens when an IIS administrator can control the recycling of an entire application pool by using Microsoft® Management Console (MMC) or a script.

Use this method when there is an application pool that is causing problems while the other sites are up and running. Consider recycling the application, as opposed to resetting the entire WWW service.