i am running a TCP server on my machine. My operating sytem is Windows 7 Professional. I tested my server with a TCP connection test software and i think my computer does not allow more than 300-400 connections. I tested my software for 1000 TCP clients and everytime my software (or computer i don't know) does not accept more than 300-400 connections.
What is the maximum number of connections for a PC (not a server PC) practically not theoretically. I am developing software on a Windows 7 PC but i will use the software on a Windows Server so i want to know if the problem is my operating system or my software.
Thank you.
On the TCP level the tuple (source ip, source port, destination ip, destination port) must be unique for each simultaneous connection. That means a single client cannot open more than 65535 simultaneous connections to a single server. But a server can (theoretically) serve 65535 simultaneous connections per client.
The highest TCP port number is 65,535. The TCP protocol provides 16 bits for the port number, and this is interpreted as an unsigned integer; all values are valid, apart from 0, and so the largest port number is (2^16 - 1) or 65,535.
Increasing the number of available (ephemeral) ports. By default, Windows only allocates ephemeral ports in the range 1024 through 4999. To increase the upper range of ephemeral ports that are dynamically allocated to client TCP/IP socket connections perform the following.
Microsoft limits the number of connections to 3975 by default, meaning that there can only be 3975 TCP/IP connections open at any given time. In addition, the TIME_WAIT state is configured by default to be 240 seconds. This means that Windows can only support an average of 33 TCP/IP connections per second.
The issue seems to be related to the number of ports that can be opened. The defaults are pretty less. Check this link to get steps on increasing them on windows
The max I believe is 65534
I remember that there is a setting to limit the number of connections to a TCP port to avoid DoS attacks (Denial Of Service).
This is a setting that can be deactivated, maybe this is the limit you're reaching.
Look here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With