JMeter Test Interface-Open a number of TCP connections time_wait status (Linux environment) solutions that cause errors

Source: Internet
Author: User

A problem found:

The server is a Linux system, with JMeter test interface, found to open a lot of TCP connections, [[email protected] bin]# ulimit-n 65535 with this command set the total number of connections, when the pressure test, the number of connections may reach more than 50000, Easily error-prone; View the number of TCP in each state:
Netstat-an | awk '/^tcp/{++s[$NF]} END {for (a-in s) print A,s[a]} ', the state of the connection status time_wait is found to be many, (count 80 port connections Netstat-nat|grep-i 80|WC -L Use this statistic as well). The interface without error, the number of open TCP connections is less, about 15000-25000 this way.

The initial suspicion is that the TCP time_wait state is too many, causing the connection time is too long, the system's port resource is occupied for a long time, the new request, and the allocation of resources.

Two-way solution:

After more than 3 days, finally found an effective solution, you can refer to the Micro-blog: http://blog.oldboyedu.com/tcp-wait/:

In the sysctl.conf configuration file # vim/etc/sysctl.conf, modify the configuration as follows:

1 net.ipv6.conf. default 1  111

Again, the number of TCP connections significantly decreased, and the interface TPC up, not easy to error, as shown in:

JMeter Test Interface-Open a number of TCP connections time_wait status (Linux environment) solutions that cause errors

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.