【发布时间】:2018-04-05 18:42:37
【问题描述】:
我们有一个网站一直处于休眠状态,由于我们的零星请求的时间敏感性,这会导致错误。
我已经看到在旧的 Azure 控制台中有“始终开启”设置,但它似乎不适用于新界面:
How to prevent an Azure website from going to sleep?
这个设置现在在哪里,或者我该如何做?
【问题讨论】:
标签: azure iis azure-cloud-services
我们有一个网站一直处于休眠状态,由于我们的零星请求的时间敏感性,这会导致错误。
我已经看到在旧的 Azure 控制台中有“始终开启”设置,但它似乎不适用于新界面:
How to prevent an Azure website from going to sleep?
这个设置现在在哪里,或者我该如何做?
【问题讨论】:
标签: azure iis azure-cloud-services
有几个选项。其中之一是使用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 角色”下找到。
【讨论】:
您也可以参考this。
【讨论】: