Solve a large number of TIME_WAIT problems in Linux

Source: Internet
Author: User
In Linux, a large amount of TIME_WAIT-Linux Enterprise Application-Linux server application information is solved. The following is a detailed description. [Root @ web02 ~] # Vi/etc/sysctl. conf
Add the following content:
Net. ipv4.tcp _ tw_reuse = 1
Net. ipv4.tcp _ tw_recycle = 1
Net. ipv4.tcp _ syncookies = 1
Make kernel parameters take effect:
[Root @ web02 ~] # Sysctl-p
Readme:
Net. ipv4.tcp _ syncookies = 1 enable the TIME-WAIT socket reuse function, which is very effective for Web servers with a large number of connections.
Net. ipv4.tcp _ tw_recyle = 1
Net. ipv4.tcp _ tw_reuse = 1 reduce the time in the FIN-WAIT-2 connection state, so that the system can process more connections.
Net. ipv4.tcp _ fin_timeout = 30 reduces the time for TCP KeepAlive connection detection, enabling the system to process more connections.
Net. ipv4.tcp _ keepalive_time = 1800 increase the length of the tcp syn queue so that the system can process more concurrent connections.
Net. ipv4.tcp _ max_syn_backlog = 8192

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.