当前位置:网站首页>测试时大量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
边栏推荐
- How to use postman
- EPSANet: An Efficient Pyramid Split Attention Block on Convolutional Neural Network
- CASA模型、CENTURY模型应用与案例分析
- Redisson distributed lock source code analysis for high-level use of redis
- C语言_指针
- 传递泛型给JSX元素
- 编程与哲学(2)——输出是为了更好的输入
- JSP中page指令的import命令具有什么功能呢?
- 科技云报道:实现元宇宙,英伟达从打造基础建设平台开始
- 小说里的编程 【连载之二十五】元宇宙里月亮弯弯
猜你喜欢
随机推荐
day_05 time 模块
TiFlash 存储层概览
USACO美国信息学奥赛竞赛12月份开赛,中国学生备赛指南
小说里的编程 【连载之二十五】元宇宙里月亮弯弯
Technology Cloud Report: To realize the metaverse, NVIDIA starts from building an infrastructure platform
爬虫——爬虫初识、requests模块
[ansible]playbook结合项目解释执行步骤
BGP通过MPLS解决路由黑洞
Biotin-C6-amine|N-biotinyl-1,6-hexanediamine|CAS: 65953-56-2
etcd实现大规模服务治理应用实战
血气方刚的年轻小伙竟去做家政小哥,是怎样成功逆袭转行的
Analysis of software testing technology How far is Turing test from us
IO process thread -> process -> day4
图扑软件数字孪生油气管道站,搭建油气运输管控平台
52. [Bool type input any non-0 value is not 1 version reason]
[OC学习笔记]ARC与引用计数
mysql 中 in 的用法
【特别提醒】订阅此专栏的用户请先阅读本文再决定是否需要购买此专栏
Ansible learning summary (11) - detailed explanation of forks and serial parameters of task parallel execution
prometheus monitoring mysql_galera cluster
![[ansible]playbook结合项目解释执行步骤](/img/fe/82b8562075fef33490d5aae7e809f5.png)







