WCF服务的Azure工作者角色被闲置后的第一​​个请求慢 [英] WCF service in Azure worker role slow on first request after being idle

查看:171
本文介绍了WCF服务的Azure工作者角色被闲置后的第一​​个请求慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有通过的ServiceHost公开一个RESTful的WCF服务(使用System.ServiceModel.Web)蔚蓝色的辅助角色。性能是大量的流量无可指责的,但它似乎是响应时间显著较高(超过五秒钟)上的第一个请求时的作用已经闲置了一段时间。有谁知道什么可能导致此?

We have an Azure worker role that exposes a RESTful WCF service (using System.ServiceModel.Web) through a ServiceHost. The performance is irreproachable on massive traffic, but it seems like the response time is significantly higher (more than five seconds) on the first request when the role has been idle for some time. Does anyone know what might cause this?

推荐答案

默认程序池的超时时间为20分钟。也许你会运行到这一点?如果是这样,你可以添加像这样一个启动脚本来更改超时:

The default AppPool timeout is 20 minutes. Might you be running into this? If so, you can add something like this to a startup script to change the timeout:

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

下面的另一个答案我张贴,以一个不同的问题,讨论这个更进一步。

Here's another answer I posted, to a different question, discussing this further.

这篇关于WCF服务的Azure工作者角色被闲置后的第一​​个请求慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆