Now, a test project finds that there are many TCP connections in the time_wait status on the performance testing machine. I checked them online. This status is also called the TCP semi-connection status.
Test environment: Nine Windows test machines, including one pressure control machine (Controller)
Server Environment: iis7.0 + MS SQL
Problem: When the Controller machine uses any windows testing machine and sends 5 vusers or more, a large number of failed transactions may occur in 8 or 10 minutes.
Analysis: view the TCP connection by viewing netstat-ano> D:/port.txt (output the information printed by netstat to the root directory of the current D disk) in cmd, there are a large number of TCP connections in the time_wait status. There are more than 65536 TCP connections in the time_wait status. In Windows, the maximum number of ports is only, each time a Performance Testing Machine accesses the server over TCP, it occupies a local port, resulting in too many time_wait states (semi-connection status) and no release, resulting in a new TCP connection to find a new port. If all the 65536 ports provided by widows are used up, there will be a large number of time_wait statuses and no new connections will be established, then there will be timeout, resulting in a large number of concurrent users downtime. This seriously affects the initiation of concurrency. The problem has been submitted to the O & M department, asking them to help.
Solution:
1. Modify the TCPIP attribute value in the Registry: timewait reclaim time
In HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters, add the DWORD key named tcptimedwaitdelay and set it to decimal 0 to shorten the time_wait wait time.
Test results: there are still a large number of connections in the time_wait status, and each machine can handle a small number of concurrent jobs without errors. When the concurrency increases, a large number of errors will occur.