当前位置:网站首页>time_ Wait and close_ Cause of wait
time_ Wait and close_ Cause of wait
2022-07-29 02:35:00 【Meme_ xp】
1.time_wait How to produce
First call close() The party initiating the active closure , Sending the last ACK After that, I will enter time_wait The state of , It means that the sender will keep 2MSL Time will come back to the original state .MSL It's worth the maximum lifetime of packets in the network . To produce this result makes this TCP Connected to the 2MSL Connection waiting period .
2.time_wait The cause of the State
1) In order to achieve TCP Reliable release of full duplex connection
2) In order to make the old packets disappear in the network due to expiration
3.time_wait How can states avoid
The server can be set up SO_REUSEADDR Socket option to notify the kernel , If the port is busy , but TCP The connection is located at TIME_WAIT Ports can be reused in state .
The server keeps a lot of TIME_WAIT state
reason
Some crawler servers or WEB The server .
Bring problems
Maintain these states to Server Burden .
The solution is simple , Is to enable the server to quickly recycle and reuse those TIME_WAIT Resources for . Optimize parameter solution
The server keeps a lot of CLOSE_WAIT state
In case of passively closing the connection , After having received FIN, But I haven't sent my own FIN The moment of , Connection is in CLOSE_WAIT state .
After the other party's connection is closed , The program didn't detect , Or the program simply forgot to close the connection at this time , So this resource has been occupied by the program .
I think that's the case , There is no way to solve this problem through the server kernel parameters , The server does not have the right to reclaim the resources preempted by the program , Unless the program is terminated . Check the code and solve it
边栏推荐
- Meeting notice of meeting OA
- Split, an avalanche caused by connection pool parameters
- time_wait和close_wait产生原因
- Day 15 (VLAN related knowledge)
- Practice and experience of security compliance in instant messaging scenarios
- Rust list (VEC) replication
- Summary of knowledge points of Engineering Economics
- How awesome is the architecture of "12306"?
- The financing demand of 129 million yuan was released, and the roadshow of the Dake city project continued to irrigate the "good seedlings" of scientific innovation
- How to use RPA to achieve automatic customer acquisition?
猜你喜欢
![[quality] code quality evaluation standard](/img/33/2c2256fd98b908ddaf5573f644ad7f.png)
[quality] code quality evaluation standard

Object based real-time spatial audio rendering - Dev for dev column

MySQL驱动中关于时间的坑

详解异步任务:任务的状态及生命周期管理

代码实现 —— 多项式的最大公因式(线性代数)

How to migrate thinkphp5 projects to Alibaba cloud function computing to cope with traffic peaks?

密码安全如何保障?安全浏览器如何管理密码?

FPGA刷题——存储器(RAM和FIFO的Verilog实现)

Explain the four asynchronous solutions of JS in detail: callback function, promise, generator, async/await

Esbuild Bundler HMR
随机推荐
How much is the report development cost in the application system?
ES6详解 快速上手!
HTTP断点续传以及缓存问题
Virsh console connection failure
How does the Devops team defend against API attacks?
Explain the four asynchronous solutions of JS in detail: callback function, promise, generator, async/await
Practice and experience of security compliance in instant messaging scenarios
Excel uses countif statistics
Talk about 11 tips for interface performance optimization
工程经济学简答题
QT qstackedwidget multi interface switching
Waiting queue wait_ queue
手把手教你安装VSCode(附带图解步骤)
0728~ sorting out interview questions
Summary of knowledge points of Engineering Economics
Meeting notice of meeting OA
redis为什么快,消息队列,单线程
I was stunned by this question that I browsed 746000 times
Kbxxxxx is not necessarily a patch, but also a description of a solution to a problem
Responsive dream weaving template makeup website