Configuring Rapid-Fail Protection 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 IIS is running in worker process isolation mode.

When an application pool detects that too many worker processes assigned to it have become unhealthy in a given period of time, rapid-fail protection is initiated. The communication channel with the World Wide Web Publishing Service (WWW service) is dropped. The WWW service detects the loss of communication and initiates the appropriate actions, typically sending an error or warning to the event log and then restarting the worker process. Worker process isolation mode can be configured so that if a particular application pool experiences consecutive multiple failures, the application pool can be automatically disabled, allowing for rapid-fail protection to start. The application pool is taken out of service and placed in a state such that the kernel-mode driver immediately returns an out-of-service message (503: Service Unavailable) to any requests to that application pool.

Procedures

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".

To configure rapid-fail protection by using IIS Manager

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

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

  3. In the Failures box, type the number of worker process failures to be detected before disabling the worker process.

  4. In the Time period box, type the number of minutes during which failure totals are accumulated.

  5. Click OK.

Configuring Rapid-Fail Protection from the Command Line

Use the following procedures to configure rapid-fail protection from the command line, and to change the default settings for rapid-fail protection in the RapidFailProtectionInterval metabase property and the RapidFailProtectionMaxCrashes metabase property.

To configure rapid-fail protection for an application pool by using Adsutil.vbs

  1. In the Run dialog box, type cmd, and then click OK.

  2. At the command prompt, type:

    cscript %SystemDrive%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/ApplicationPoolName/RapidFailProtection TRUE

By default, rapid-fail protection is activated if five process failures occur within a five-minute interval. You can reset the accumulation interval by updating the RapidFailProtectionInterval metabase property, or you can reset the maximum number of crashes to allow during the interval by updating the RapidFailProtectionMaxCrashes metabase property.

To specify the maximum number of minutes during which worker process failures are accumulated

  • At the command prompt, type:

    cscript %SystemDrive%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/ApplicationPoolName/RapidFailProtectionInterval n

    In the preceding syntax, replace n with the number of minutes that you want to set for the accumulation interval.

The RapidFailProtectionMaxCrashes property specifies the maximum number of worker process failures that are allowed within the minutes specified by the RapidFailProtectionInterval property. The default value for the RapidFailProtectionMaxCrashes property is 5.

To specify the maximum number of worker process failures before rapid-fail protection occurs

  • At the command prompt, type:

    cscript %SystemDrive%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/ApplicationPoolName/RapidFailProtectionMaxCrashes n

    In the preceding syntax, replace n with the maximum number of worker process failures you want to allow before rapid-fail protection occurs.

If you set the RapidFailProtection metabase property to true but do not set either the RapidFailProtectionInterval property or the RapidFailProtectionMaxCrashesproperty, IIS applies the default settings for these properties.

For more information about the rapid-fail metabase properties, see RapidFailProtection Metabase Property, RapidFailProtectionInterval Metabase Property, and RapidFailProtectionMaxCrashes Metabase Property.