question

AntonyMaxwin-4065 avatar image
0 Votes"
AntonyMaxwin-4065 asked RicardoParedes-5958 commented

How to set to allow MaximumTCP connection in windows server 2016

HI
I have one SQL DB server ( windows server 2016) and two IIS server. in both DB server and application server, when the TCP connection reaches 500, suddenly there is a choking happening and it won't allow any other new TCP connections , and it again starts from 10. is there any way can i increase the maximum connection limit in windows , or is it depends on the traffic ?.
I have done some changes in registry but still no changes

PIC 1 - TCP connection count reaches 500

119189-image.png


Pic 2 TCP connection count fall into 10

119170-image.png


windows-server-2016windows-platform-network
image.png (550.0 KiB)
image.png (715.7 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi there,

I'm having the exact same problem.. Did you find a solution? Can anyone help?

Thanks a lot

0 Votes 0 ·

hi @WilliamCaleffi-4560
this is not a issue. which version of operating system are you using. by default from windows server 2016 it is set to allow maximum connection. but you are currently facing is a mechanism called TCP congestion. this to avoid overload on the TCP part. for more details please refer the below article.

https://en.wikipedia.org/wiki/TCP_congestion_control#:~:text=In%20TCP%2C%20the%20congestion%20window,overloaded%20with%20too%20much%20traffic.

to avoid this you need to tune the application/Database. please identify which process cause too much data transfer.

is any application or database hosted in the server?

regards
Antony maxwin

0 Votes 0 ·

Hi @AntonyMaxwin-4065,

I am having a similar issue that you were mentioning before, my application runs until 650 established connections at the same time and then it drops too the minimum. My TCP server is running over a virtual machine in azure with windows server 2016, the application that handles the data and he sockets is built in python .
I am dealing with an average of 22K connections per minute. I am having a delay in processing the messages of about 10min

Do you have any advice on how to improve the situation?

Thank you.

Regards!

Ricardo Paredes

0 Votes 0 ·

1 Answer

SunnyQi-MSFT avatar image
0 Votes"
SunnyQi-MSFT answered

Hi,

Thanks for posting in Q&A platform.

I noticed that you have posted this new thread for your question. Sorry for the late response since I didn't receive the notification for the previous thread.

I did lots of research and found that there is a parameter that limits the maximum number of connections that TCP may have open simultaneously. You could have a try:

HKEY_LOCAL_MACHINE \System \CurrentControlSet \Services \Tcpip \Parameters

Name:TcpNumConnections
Value type: REG_DWORD - Number
Valid range: 0 - 0xfffffe
Default: 0xfffffe
Description: This parameter limits the maximum number of connections that TCP can have open at the same time.

For more details regarding of TCP/IP protocol, please refer to the following article:

https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/tcpip-and-nbt-configuration-parameters

And I also find the following article for configuring the max limit for concurrent TCP connections, you could have a look:

Configure the max limit for concurrent TCP connections
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.