如何在IIS 7.5中配置应用程序池在停止时自动重新启动?
我的网站每天宕机几次,当我检查应用程序池(IIS 7.5)时,我发现它已停止,我必须手动重新启动它。如何设置应用程序池以便在发生错误后自动重新启动?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要将网站运行的应用程序池的启动模式从 onDemand 更改为 AlwaysRunning。默认情况下,IIS 将所有应用程序池设置为 onDemand。
来源:http://msdn.microsoft.com /en-us/library/ee677285%28v=azure.10%29.aspx
在 IIS 8 及更高版本中,现在可以直接从应用程序获取启动模式设置池的高级设置。
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.
在 IIS 8 及更高版本中,现在可以直接从应用程序池的高级设置中使用 startMode 设置。
将 startMode 更改为 AlwaysRunning 将在失败时自动重新启动应用程序池。
https://learn.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/#new-in-iis-75-and-later
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.
https://learn.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/#new-in-iis-75-and-later
“默认情况下 IIS 将所有应用程序池设置为 onDemand”的问题是当您必须更新这些位时。然后站点将重新启动并锁定部署。最好在应用程序池下的高级设置下设置快速失败保护。将失败间隔(分钟)设置为 1,将最大失败设置为 5。
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.