Reputation: 1122
My website was down several times per day and when I check the application pool (IIS 7.5), I saw it was stopped and I must restart it manually. How can I setup application pool so that it automatically restarts after an error?
Upvotes: 41
Views: 59577
Reputation: 1360
You will need to change the startMode for the application pool your website is running on from onDemand to AlwaysRunning. By default IIS sets all application pools to onDemand.
Source: http://msdn.microsoft.com/en-us/library/ee677285%28v=azure.10%29.aspx
In IIS 8 and above, the start mode setting is now directly available from the Application Pool's Advanced Settings.
Upvotes: 66
Reputation: 1360
In IIS 8 and above, the startMode setting is now directly available from the Application Pool's Advanced Settings.
Changing the startMode to AlwaysRunning will automatically restart the Application Pool if it fails.
Upvotes: 4
Reputation: 11
Problem with "By default IIS sets all application pools to onDemand" is when you have to update the bits. Then the site will restart and lock the deployment. Better to set the Rapid-fail protection under advanced settings under app pool. Set Failure interval (min) to 1, and Max fail to 5.
Upvotes: 1