Apache TIME_WAIT solution recently found that there are too many connections between apache and the Server Load balancer, and most of them are TIME_WAIT. After adjusting apache2.conf, finally, Baidu uses the following solution to solve vi/etc/sysctl by adjusting the kernel parameters. edit the conf file and add the following content: net. ipv4.tcp _ syncookies = 1net. ipv4.tcp _ tw_reuse = 1net. ipv4.tcp _ tw_recycle = 1net. ipv4.tcp _ fin_timeout = 30 and then run/sbin/sysctl-p to make the parameter take effect. Net. ipv4.tcp _ syncookies = 1 indicates enabling SYN Cookies. When a SYN wait queue overflows, cookies are enabled to prevent a small number of SYN attacks. The default value is 0, indicating that the service is disabled. net. ipv4.tcp _ tw_reuse = 1 indicates that reuse is enabled. Allow TIME-WAIT sockets to be re-used for a New TCP connection. The default value is 0, indicating that it is disabled. net. ipv4.tcp _ tw_recycle = 1 indicates that fast recovery of TIME-WAIT sockets in TCP connections is enabled. The default value is 0, indicating that the quick recovery is disabled. Net. ipv4.tcp _ fin_timeout: Modify the default TIMEOUT time of the system.