当前位置:网站首页>关于出现大量close_wait状态的理解
关于出现大量close_wait状态的理解
2022-07-31 04:10:00 【滴水可藏海】
以web服务器产生大量的close_wait状态为例
1.close_wait状态介绍:
客户端主动关闭连接,服务器接收到客户端的FIN,但是还没有发送自己的FIN,此时的状态为close_wait状态,大量的close_wait状态拖累服务器性能
2.close_wait产生的原因:
某种情况下客户端关闭了连接,但是我方忙于读写,没有关闭连接
3.解决方法:
思想:检查出客户端已经关闭的连接,关闭他
之所以会出现这种问题,肯定是服务器端的连接释放的代码存在问题
1.当服务器读写失败时,可以选择关闭连接
2.定期向连接发送询问数据,检查收到的回复数据包(Heart-Beat线程发送指定格式的心跳数据包)
3.修改keep-live参数(超时时间,tcp检查间隔时间:keeplive探测包发送的间隔,tcp检查次数:如果对方不予应答,探测包发送的次数)
ps:服务器出现大量的close_wait状态,这个锅肯定是服务器端的coder背!
边栏推荐
- Learning DAVID Database (1)
- 【论文阅读】Mastering the game of Go with deep neural networks and tree search
- 问题7:列表的拼接
- 安全20220722
- beforeDestroy与destroyed的使用
- LeetCode每日一练 —— OR36 链表的回文结构
- ClickHouse: Setting up remote connections
- Knowledge Distillation 7: Detailed Explanation of Knowledge Distillation Code
- Mysql 45 study notes (23) How does MYSQL ensure that data is not lost
- $parent/$children and ref
猜你喜欢
With 7 years of experience, how can functional test engineers improve their abilities step by step?
What skills do I need to learn to move from manual testing to automated testing?
三子棋的代码实现
[Paper reading] Mastering the game of Go with deep neural networks and tree search
高等数学---第九章二重积分
MATLAB/Simulink & & STM32CubeMX tool chain completes model-based design development (MBD) (three)
[C language] Three-pointed chess (classic solution + list diagram)
$attrs/$listeners
Key Technologies of Interface Testing
Summary of Huawei Distributed Storage FusionStorage Knowledge Points [Interview]
随机推荐
Recursive implementation of the Tower of Hanoi problem
安全20220718
The use of beforeDestroy and destroyed
(四)递归、可变参数、访问修饰符、理解 main 方法、代码块
$parent/$children and ref
MATLAB/Simulink&&STM32CubeMX工具链完成基于模型的设计开发(MBD)(三)
[Swift]自定义点击APP图标弹出的快捷方式
[Paper reading] Mastering the game of Go with deep neural networks and tree search
Basic knowledge of mysql (2)
How to develop a high-quality test case?
Safety 20220722
进程间通信
已解决(最新版selenium框架元素定位报错)NameError: name ‘By‘ is not defined
浅识Flutter 基本组件之CheckboxListTile组件
【SemiDrive源码分析】【MailBox核间通信】44 - 基于Mailbox IPCC RPC 实现核间通信(RTOS侧 IPCC_RPC Server 消息接收及回复 原理分析篇)
idea工程明明有依赖但是文件就是显示没有,Cannot resolve symbol ‘XXX‘
5. How does the SAP ABAP OData service support the $filter operation
(5) final, abstract class, interface, inner class
some of my own thoughts
Unity2D 自定义Scriptable Tiles的理解与使用(四)——开始着手构建一个基于Tile类的自定义tile(下)