13 March 2009

IIS 7 Tip # 5 Run a command when Rapid Fail Protection is triggered.

Rapid-Fail Protection disables application pools if they crash multiple times within in a specified time period. This prevents the failing application pool from getting into a continuous loop of crashing and restarting. This protects other application pools running on the server as repeated failures can consume lot of system resources. When rapid-fail protection kicks in it stops the application pool that is repeatedly crashing and your clients will start getting a 503 – Service Unavailable error. An administrator will have to manually enable the application pool again.

You also have to option to configure an executable to run when ever rapid-fail protection is triggered. For example below I have configured the application pool to restart the IIS service using iisreset.exe … the /rebootonerror will reboot the whole server if iisreset.exe for some reason fails to restart the services.

vijaysk-rapidfailover

<applicationPools>
       <add name="DefaultAppPool" autoStart="true">
         <failure autoShutdownExe="c:\windows\system32\iisreset.exe" autoShutdownParams="/rebootonerror" />
       </add>
</applicationPools>

This option is also available on IIS 6.0 but it is not exposed via the IIS manager. You can set is as follows

cscript adsutil.vbs set W3SVC/AppPools/DefaultAppPool/autoshutdownapppoolexe “c:\windows\system32\iisreset.exe”


Bookmark and Share

Filed under: ,
 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Anith &raquo; IIS 7 Tip # 5 Run a command when Rapid Fail Protection is triggered. said:

PingBack from http://www.anith.com/?p=18348

12 March 09 at 9:52 PM
# DotNetShoutout said:

Thank you for submitting this cool story - Trackback from DotNetShoutout

14 March 09 at 12:18 AM
# Tanju said:

I tried this and it did not work. So I entered the command from the command prompt (with "run as administrator). The restart attempt failed, so it initiated a reboot. But it reads: "attempting to reboot the server" and then next line "not implemented". Any ideas why the reboot option returns a "not implemented"?

13 April 09 at 7:30 PM

Leave a Comment

Comment Policy: No HTML allowed. URIs and line breaks are converted automatically. Your e–mail address will not show up on any public page.

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Page view tracker