Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

RapidFailProtection Property

IIS 7.0

Gets or sets a value indicating whether rapid-fail protection is on or off.

Namespace:  Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

public bool RapidFailProtection { get; set; }

Property Value

Type: System..::..Boolean
true if rapid-fail protection is on; false if rapid-fail protection is off. The default is true.

true indicates that the applications in an application pool are put out of service when the number of worker process crashes reaches the maximum specified by the RapidFailProtectionMaxCrashes property within the time specified by the RapidFailProtectionInterval property. The default is true.

When an application pool detects that too many of its worker processes have become unhealthy in a specified period of time, rapid-fail protection is initiated. The communication channel for IIS is dropped. IIS detects the loss of communication, sends an error or warning to the event log, and then restarts the worker process. The application pool is taken out of service, and the kernel-mode driver returns an out-of-service message (503: Service Unavailable) to requests to that application pool.

The following example displays the value of the RapidFailProtection property. If the property value is true, this example sets the RapidFailProtectionInterval and RapidFailProtectionMaxCrashes property values. This code example is part of a larger example provided for the ApplicationPoolFailure class.



// If the RapidFailProtection is enabled, set 
// the Interval and maximum crashes properties.
if (manager.ApplicationPoolDefaults.Failure.RapidFailProtection)
        RapidFailProtectionInterval = (TimeSpan.FromMinutes(10));
        RapidFailProtectionMaxCrashes = 6;
// Commit the changes to ApplicationHost.config file.

Community Additions

© 2015 Microsoft