Share via


Configure Application Pool Health

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

Monitoring the health of a worker process includes detecting whether the worker process is able to serve requests and then taking appropriate action. For example, if a worker process fails to respond to a ping request by the World Wide Web Publishing Service (WWW service), the worker process probably does not have threads available for processing incoming requests. You can monitor the health condition of an application pool by pinging the worker processes assigned to it at regular intervals. When a configurable unhealthy condition occurs, you can also set the following features to take corrective action:

  • Rapid-fail protection

  • Startup time limit

  • Shutdown time limit

Requirements

  • Mode: This feature of Internet Information Services (IIS) 6.0 is available only when IIS is running in worker process isolation mode.

  • Credentials: Membership in the Administrators group on the local computer.

  • Tools: Iis.msc.

Recommendation

As a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the Run as command to run IIS Manager as an administrator. At the command prompt, type **runas /user:**administrative_accountname mmc %systemroot%\system32\inetsrv\iis.msc.

Procedures

Consider the following when setting the configuration for recycling the worker processes assigned to an application pool:

  • Worker process pinging is enabled by default. Adjust the ping interval to get timely information about application pool health without triggering false unhealthy conditions.

  • When the WWW service detects that a worker process fails more than a set maximum number of times in a set time period, it places the worker process in a rapid-fail protection state. Placing application pools in rapid-fail protection state protects the availability of other applications on the server.

  • When the WWW service detects that a worker process is unhealthy, it marks the worker process for termination. Within configured time limits, IIS terminates the worker process. It is important to tune the shutdown time period to fit the load characteristics of the applications that are being processed.

  • After IIS terminates an unhealthy worker process, it starts a new worker process to replace the unhealthy one. It is important to tune the startup time period to fit the overlap desired between the unhealthy worker process and the new worker process.

To configure worker process pinging

  1. In IIS Manager, expand the local computer, right-click the application pool you want to configure, and then click Properties.

  2. On the Health tab, select the Enable pinging check box.

  3. In the text box to the right of Ping worker process every (frequency in seconds), type the number of seconds to elapse before the worker process is pinged, and then click OK.

To configure rapid-fail protection

  1. In IIS Manager, expand the local computer, right-click the application pool you want to configure, and then click Properties.

  2. On the Health tab, select the Enable rapid-fail protection check box.

  3. In the text box to the right of Failures, type the maximum number of failures allowed.

  4. In the box to the right of Time period (in minutes), type the elapsed time, in minutes, during which the number of failures is counted, and then click OK.

To configure startup and shutdown time limits

  1. In IIS Manager, expand the local computer, right-click the application pool you want to configure, and then click Properties.

  2. On the Health tab, under Startup time limit, in the text box to the right of Worker process must startup within (time in seconds), type the time, in seconds, to elapse before starting up a new worker process.

  3. On the Health tab, under Shutdown time limit, in the text box to the right of Worker process must shutdown within (time in seconds), type the time, in seconds, to elapse before shutting down a failing worker process, and then click OK.