WCF并发连接配置

问题描述:

我们有一个新的Win 2012服务器托管一个传统的.NET 3.5 WCF服务(有22个端点,可能有几百个操作),我们遇到一些性能问题并希望控制连接数。WCF并发连接配置

我们已经附加了perfmon Web Service/Current Connections计数器,并且看到这个值反复上升到稳定的24个连接(偶尔会出现尖峰到25)。

Perfmon view showing Current Connections

我们曾尝试使用管理连接system.ServiceModel\behaviors\serviceBehaviors\behavior\serviceThrottling的数量。我们曾尝试默认值,低数量,建议和高位数字:

<!-- default --> 
<serviceThrottling /> 

<!-- low --> 
<serviceThrottling maxConcurrentCalls="5" maxConcurrentSessions="10" maxConcurrentInstances="15"/> 

<!-- recommended (2 processors) --> 
<serviceThrottling maxConcurrentCalls="32" maxConcurrentSessions="200" maxConcurrentInstances="232"/> 

<!-- high--> 
<serviceThrottling maxConcurrentCalls="2000" maxConcurrentSessions="2000" maxConcurrentInstances="2000"/> 

enter image description here

  1. 在别的地方可能就此被限制越来越设定?
  2. 我们在perfmon中加入了正确的计数器吗?

更新

我们增加了一个客户端,并增加了一倍的WS服务器处理的请求数量。所以这已经证明节流发生在上游。上游客户端是一个.NET3.5 ASP.NET网站。连接到WCF服务是通过wsHttpBinding。

我们已经添加了system.net\connectionManagement\maxconnection,这没有任何影响。

其他设置可能会限制传出的ASP.NET连接到WCF服务?

请尝试添加该部分并再次测试性能:

<system.net> 
    <connectionManagement> 
     <add address="*" maxconnection="250" /> 
    </connectionManagement> 
    </system.net> 

的默认值是2

+0

我已经在客户端此设置,但现在也已将此添加WCF服务太。 “当前连接”现在暂时跳到34,然后再次回到24。我不认为这有帮助,但无论如何感谢。 –

+0

这让我觉得这是上游服务的连接限制吗?我们使用Jmeter通过网站应用加载,我在那里运行120个线程。 –