2

Possible Duplicate:
Max number of concurrent HttpWebRequests

I have an application (C#/.NET 4.0) which is consuming a WSDL service which is prohibitively slow, and I need to send requests in large quantities.

I am parallellizing the operation by creating several Threads to manage the requests. However, I'm running into the maximum 2 persistent HTTP connections allowed: if I run two threads, they both come back with 400ms turnarounds. If I run four threads, they all come back with 800ms turnarounds because they're being serialized through only two connections.

Interestingly, if I spawn several instances of the same proof-of-concept application, running two threads each, they all run with 400ms turnaround per thread; thus, the connection is per-instance rather than per-machine or -NIC.

How can I increase the number of persistent connections that my application will use?

(In case this is a vital detail, it's running over HTTPS)

Answer for when it's closed: It's a web/app.config setting.

<configuration>
  <system.net>
    <connectionManagement>
      <add address="*" maxconnection="800"/>
    </connectionManagement>
  </system.net>
</configuration>
Community
  • 1
  • 1
eouw0o83hf
  • 9,438
  • 5
  • 53
  • 75

0 Answers0