次の方法で共有


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

Comments

  • Anonymous
    March 12, 2009
    PingBack from http://www.anith.com/?p=18348

  • Anonymous
    March 13, 2009
    Thank you for submitting this cool story - Trackback from DotNetShoutout

  • Anonymous
    April 13, 2009
    The comment has been removed

  • Anonymous
    August 14, 2013
    I'm trying to work on a process to start the app pool after Rapid Failure Protection happens, so I'm to use 'appcmd recycle apppool /apppool.name:string'.  However, I need to test this before putting it into production.  Any ideas for how I cause failures to the app pool so that I can see if the app pool restart happens like I'm hoping?