Remove Windows 7's limitation on number of concurrent tcp connections (http web requests)

3

1

I have an application that tries to open as many http requests as possible (in order to stress test a proxy implementation)

It seems to me that Win7 (SP1) may have a limitation on number of concurrent opened connection (it may be the so called half-open state if I'm not wrong). Is there something I can do for client ? and also I test using a vista PC that acts as a proxy server.

It would be great if I could configure it to sustain at least 50 new connections initiated / second on client side and many more on server.


I made the modification according to this technet article by setting TcpNumConnections = 150 but it doesn't make a difference. I still only see about 20 tcp sockets associated with my http client by using tcpview.

Ghita

Posted 2011-12-02T17:15:24.417

Reputation: 39

1Voting to close as off topic. The 20 connection limit is specified in the Windows 7 EULA (though increased from 10 in previous versions): e. Device Connections. You may allow up to 20 other devices to access software installed on the licensed computer to use only File Services, Print Services, Internet Information Services and Internet Connection Sharing and Telephony Services. You may not have known this, but it would violate the EULA to allow more than 20 TCP/IP connections. – bwDraco – 2011-12-02T18:09:28.127

7@DragonLord That EULA provision doesn't apply -- he's not using File Services, Print Services, Internet Information Services, ICS, or Telephony. He's making connections from a test program to a proxy. – David Schwartz – 2011-12-02T18:47:34.913

2Also, the text explicitly says 20 devices. He's connecting to one proxy server. – MSalters – 2011-12-02T19:01:35.907

2Increasing half-open connections do not violate the EULA to one device. – Jeff F. – 2012-05-21T14:06:43.267

Answers

1

To keep the TCP/IP stack from taking all resources on the computer, there are different parameters that control how many connections it can handle. If running applications that are constantly opening and closing connections (P2P), or are providing a service which many tries to connect to at the same time (Web-server like IIS), then one can improve the performance of these applications by changing the restriction limits.

There are parameters that limit the maximum number of connections that TCP may have open simultaneously.

To view complete instructions that on how to increase the number of simultaneous connections that you can have open at the same time, go to this website.

wizlog

Posted 2011-12-02T17:15:24.417

Reputation: 12 320

-1

The answer over on stackoverflow here may be of use here, I was seeing the same issue.

To increase the connection limit per host you can do this anytime before you begin making the HTTP requests.

System.Net.ServicePointManager.DefaultConnectionLimit = 1000;

Tristan Warner-Smith

Posted 2011-12-02T17:15:24.417

Reputation: 193