简体   繁体   English

IIS 8-HTTP错误503。服务不可用

[英]IIS 8 - HTTP Error 503. The service is unavailable

I host my website in a Windows server 2012 (IIS8) environment. 我将网站托管在Windows Server 2012(IIS8)环境中。 It was running successfully for the last couple of months but on two occasions recently the application pool crashed. 在过去的几个月中,它成功运行,但是最近有两次应用程序池崩溃。 When we tried to access the website it displayed an error of "HTTP Error 503. The service is unavailable". 当我们尝试访问该网站时,它显示错误“ HTTP错误503。该服务不可用”。 After we restarted the application pool the issue went away. 重新启动应用程序池后,问题就消失了。 Is this some kind of Windows patching issue or something else? 这是Windows修补问题还是其他原因?

Have a look in the Event Viewer's Application log, for ASP.NET 'error', 'warning' and 'critical' events that happened around the time the web site stopped working. 查看事件查看器的应用程序日志,以了解在网站停止工作时发生的ASP.NET“错误”,“警告”和“紧急”事件。 These should give you some idea as to why it shutdown the w3wp process. 这些应该使您了解为什么它会关闭w3wp进程。

The default setting for the application pool 'Rapid Fail Protection' allows for 5 failures in 5 minutes. 应用程序池“快速故障保护”的默认设置允许在5分钟内发生5次故障。 You could change this to something less strict, eg allow 20 failures in 2 minutes. 您可以将其更改为不太严格的名称,例如,在2分钟内允许20次失败。 There's also a field called 'Shutdown Executable' where you can put a script that runs when the app pool is shutdown. 还有一个名为“ Shutdown Executable”的字段,您可以在其中放置在应用程序池关闭时运行的脚本。 I've known people to put a cmd file / script that re-starts the application pool in here, so the website gets re-started automatically after the crash. 我知道有人在这里放置一个cmd文件/脚本来重新启动应用程序池,因此该网站在崩溃后会自动重新启动。 Obviously you need to think about the ramifications of doing something like this. 显然,您需要考虑做这样的事情的后果。 But if the errors that cause the w3wp to crash are not, in your opinion, too severe you might want to try this. 但是,如果您认为导致w3wp崩溃的错误不是太严重,则不妨尝试一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM