WCF service in Azure worker role slow on first req

2020-02-15 02:53发布

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?

1条回答
我想做一个坏孩纸
2楼-- · 2020-02-15 03:07

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.

查看更多
登录 后发表回答