【问题标题】:WCF service in Azure worker role slow on first request after being idleAzure 辅助角色中的 WCF 服务在空闲后第一次请求时变慢
【发布时间】:2012-04-27 14:18:47
【问题描述】:

我们有一个 Azure 辅助角色,它通过 ServiceHost 公开 RESTful WCF 服务(使用 System.ServiceModel.Web)。在大流量上的性能是无可指责的,但是当角色空闲一段时间时,第一个请求的响应时间似乎要长得多(超过 5 秒)。有谁知道是什么原因造成的?

【问题讨论】:

    标签: azure timeout python-idle azure-worker-roles servicehost


    【解决方案1】:

    默认的 AppPool 超时为 20 分钟。你可能会遇到这个?如果是这样,您可以在启动脚本中添加类似这样的内容来更改超时:

    %windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
    

    这里是another answer 我发布的另一个问题,进一步讨论这个问题。

    【讨论】:

    • +1 你知道为什么默认的 Azure IIS AppPool 超时设置为 20 分钟吗?似乎我交谈过的每个 Azure 用户都需要删除 AppPool 超时。
    • 设置与Windows Server AppPool超时一致,也是20分钟。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-08-05
    • 2014-06-06
    • 1970-01-01
    • 2013-06-12
    • 1970-01-01
    • 1970-01-01
    • 2015-07-31
    相关资源
    最近更新 更多