ChannelFactory Maximum Connection Pool

I am creating a testing tool to emphasize the load on the server. I create many different threads that send individual requests to the server. It is apparently limited to ChannelFactory . These are bottlenecks when making an actual service call, for example:

_proxy.MyServiceCall(...);

I tried several different approaches:

  • Using one static ChannelFactory common to all threads
  • Create a new factory channel for the stream
  • Create a new factory channel per call

All this leads to pretty similar performance. Apparently, there is a global static pool of available connections used by the factory channel. I tried to look at it, but could not find anything. Do you know more about this? Do you think my guess that there is a static connection pool is correct? If you know how to set it up?

This is the current configuration of the test application:

<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>
+5
source share
1 answer

It turned out that all I need to do is add the configuration for the system.net connection:

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

See: Element (Network Settings)

, , : IIS/WAS

+4

All Articles