2016-11-15 113 views
0

我們有一個新的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服務?

回答

0

請嘗試添加該部分並再次測試性能:

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

的默認值是2

+0

我已經在客戶端此設置,但現在也已將此添加WCF服務太。 「當前連接」現在暫時跳到34,然後再次回到24。我不認爲這有幫助,但無論如何感謝。 –

+0

這讓我覺得這是上游服務的連接限制嗎?我們使用Jmeter通過網站應用加載,我在那裏運行120個線程。 –