How to atomatically start an app pool in Windows IIS when it crashes or stops

By Frank Forte

I have had the problem of a production website going down and giving a 503 error every couple of months, and it turns out the application pool in IIS was just stopped and decided not to restart.

The website is on windows server 2008, and the website runs PHP (the problem occurred with every PHP version we have run).

I found that in the IIS gui, you can click the problematic app pool, go to advanced settings, and under Rapid Fail Protection, you can add a program to run when the pool is shutting down.

Shutdown Executable: c:\Windows\System32\inetsrv\Appcmd.exe
Shutdown Executable Parameters: start apppool /apppool.name:”nameOfYourPool”

I know running the above from the command line works. Let’s hope it works the next time the app pool crashes or turns off unexpectedly.



Tags: , , ,
This entry was posted on Saturday, January 18th, 2014 at 10:45 pm and is filed under Web Servers. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.