当前位置:网站首页>测试时大量TIME_WAIT
测试时大量TIME_WAIT
2022-08-02 08:16:00 【Cliven_】
在进行TCP短连接测试时
TCP客户端在段时间内向服务端建立大量的连接
在程序运行一段时间后出现 connection refusaued 错误。
这是由于客户端每建立一个TCP连接需要一个端口,即便客户端关闭了TCP连接完成了4次挥手,操作系统任然会保留一段时间的这个连接。
见 [1]

该问题可以通过配置Linux的端口重用参数来实现对处于 TIME_WAIT 状态下的端口的重用。
sudo echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse

参考文献
[1]. golang 大量 TIME_WAIT . 明月几时有 . 2019-11 . https://zjj2wry.github.io/post/golang/time-wait/
[2]. linux . man . https://man7.org/linux/man-pages/man7/tcp.7.html
边栏推荐
- C语言基础_结构体
- shell中计算命令详解(expr、(())、 $[]、let、bc )
- PyCharm使用教程(较详细,图+文)
- next permutation
- EPSANet: An Efficient Pyramid Split Attention Block on Convolutional Neural Network
- R language plotly visualization: plotly visualizes the scatter plot of the actual value of the regression model and the predicted value of the regression, analyzes the prediction performance of the re
- QT web development - Notes - 3
- 小说里的编程 【连载之二十二】元宇宙里月亮弯弯
- 科技云报道:实现元宇宙,英伟达从打造基础建设平台开始
- pnpm的安装与使用
猜你喜欢
随机推荐
Button to control the running water light (timer)
自定义table表格
Installation and use of pnpm
Shell becomes canonical and variable
血气方刚的年轻小伙竟去做家政小哥,是怎样成功逆袭转行的
ip地址那点事(二)
redis的安装与应用
prometheus monitoring mysql_galera cluster
JSP页面中page指令有哪些属性及方法可使用呢?
Codeforces Round #811 (Div. 3)无DF
Analysis of software testing technology How far is Turing test from us
编程与哲学(2)——输出是为了更好的输入
二分类和多分类
PostgreSQL学习总结(11)—— PostgreSQL 常用的高可用集群方案
小说里的编程 【连载之二十二】元宇宙里月亮弯弯
小说里的编程 【连载之二十四】元宇宙里月亮弯弯
传递泛型给JSX元素
Redis分布式锁入门
PyCharm usage tutorial (detailed version - graphic and text combination)
【特别提醒】订阅此专栏的用户请先阅读本文再决定是否需要购买此专栏









