There are a large number of connections in the time_wait status in the performance testing machine, affecting the initiation of concurrent pressure.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.