我正在創建一個測試工具來強調加載服務器。我創建了許多不同的線程,將單獨的請求發送到服務器。它似乎受到ChannelFactory的限制。它瓶頸上使得實際服務調用,例如:ChannelFactory最大連接池
_proxy.MyServiceCall(...);
我試過幾種不同的方法:
- 使用的所有線程
- 共享的單一靜態的ChannelFactory創建新通道每個線程
- 創建每次調用一個新的通道工廠廠
所有這些結果表現相當類似。似乎有一個渠道工廠正在使用的全球靜態可用連接池。我試過了,但找不到任何東西。你會更瞭解這個嗎?你認爲我的猜測是有一個靜態的連接池是正確的嗎?如果是這樣,你知道如何配置?
這是測試應用程序的當前配置:
<configuration>
<system.serviceModel>
<client>
<endpoint binding="wsHttpBinding" bindingConfiguration="SynchronizationServiceBinding" contract="My.Namespace.ISynchronizationService" name="ClientBinding">
</endpoint>
</client>
<bindings>
<wsHttpBinding>
<binding name="SynchronizationServiceBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="10485760">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
<reliableSession enabled="false"/>
<readerQuotas maxArrayLength="1000000"/>
</binding>
</wsHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup> </configuration>
您是否配置了[throttling](http://msdn.microsoft.com/en-us/library/ms735114%28v=vs.90%29.aspx)? – oleksii
我沒有權限訪問服務器配置,但我知道服務器能夠處理更多的調用,然後測試工具當前能夠發送,所以限制在測試工具上。我已經添加了測試工具的配置。 – kazvictor