Monitoring Application Pool Health

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

The WWW service monitors the health of worker processes by periodically pinging them to determine their responsiveness. If a worker process fails to respond to a ping (for example, the worker process might not have available threads to process the incoming request), the WWW service either terminates the worker process and creates another worker process to replace it, or releases the worker process but lets it continue to run. You can configure IIS to perform a specified action when an unhealthy worker process is released — for example, you can specify that IIS attach a debugger to a released worker process.

Additionally, the WWW service maintains a communication channel to each worker process and can detect a drop in the communication channel, which indicates a worker process failure. When a worker process fails of its own accord, the WWW service starts another worker process in its place, provided the application pool does not go into rapid-fail protection.

In addition to monitoring the health of worker processes, the WWW service can detect ongoing problems with the entire application pool by using rapid-fail protection. For example, if worker processes are terminating abnormally every few seconds, the WWW service can determine that the application pool is unhealthy and disable it, preventing the unhealthy application pool from affecting applications in other pools.

The following conditions cause an application pool to start or stop:

  • Initiation of rapid-fail protection causes an application pool to stop. For more information about rapid-fail protection, see Configuring Rapid-Fail Protection.

  • CPU monitoring shuts down an application pool after it reaches the configured Maximum CPU use limit. When the limit is reached, the application pool shuts down and remains down until the CPUResetInterval time limit expires, at which time the application pool restarts. For more information about CPU monitoring, see Enabling CPU Monitoring.

  • A configuration error occurs — such as when an incorrect user name or password, or a nonexistent or misconfigured account identity, is used — causing an application pool to stop. For more information about configuring worker process account identities, see Managing a Secure IIS 6.0 Solution and Configuring Worker Process Identities.

  • A Windows administrator performs a demand stop or start on an application pool. For more information about performing demand stops and starts on an application pool with the IIsApplicationPool (WMI) class and the IIsApplicationPool (ADSI) class, see the IIS Programmatic Administration Reference in the Platform SDK on MSDN.

You can enable health monitoring for an application pool by using IIS Manager or by using the Adsutil.vbs utility to update metabase properties from the command line. For more information about configuring health monitoring, see Configuring Health Monitoring.