如何防止Azure云服务(经典)进入休眠状态(2018年)?

时间:2018-04-05 18:42:38

标签: azure iis azure-cloud-services

我们有一个网站不断入睡,由于我们的零星请求的时间敏感性而导致错误。

我已经看到了#34; Always On"在旧的Azure控制台中进行设置,但它似乎不适用于新界面:

How to prevent an Azure website from going to sleep?

现在这个设置在哪里,或者我该如何做同等效果?

这是我看到的: Azure Cloud Service Display

2 个答案:

答案 0 :(得分:1)

有几种选择。其中一个是使用Traffic Manager Endpoint Monitoring,它会一直调用你的应用程序,因此它不会回收。或者在它发生时自动重新启动。

根据博文Windows Azure WebSites and Cloud Services Slow on First Request,您可以在每次重新启动角色时,在您的软件包中包含一个脚本,该脚本配置为作为启动脚本运行。"

REM *** Prevent the IIS app pools from shutting down due to being idle.
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00

REM *** Prevent IIS app pool recycles from recycling on the default schedule of 1740 minutes (29 hours).
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.recycling.periodicRestart.time:00:00:00

如何继续进行配置,请参阅"避免自动回收Azure云服务Web角色"该帖子。

答案 1 :(得分:1)

  • 检查Azure门户上的Cloud Service可用性。
  • 确保所有角色实例都处于Ready状态。如果他们不是, 请参阅故障排除刀片。
  • RDP进入角色实例并检查IIS进程(w3wp.exe) 任务管理器正在运行。
  • 如果w3wp.exe进程未在任务管理器中显示,请转至IIS Manager并重新启动该应用程序。
  • 检查浏览器中的http响应代码。 50倍的错误 与应用程序相关的问题,请参阅故障排除刀片。
  • 检查默认端口80(对​​于http)和443(对于https)是否为 无障碍。使用TELNET或TCPING确保w3wp.exe进程 正在听它。
  • 如果您的Web应用程序可以在本地访问,但不能在外部访问, 可能是与网络有关的问题。

您也可以参考this

相关问题