Comments (5)
I happen to run EchoServer and EchoClient in the wangle examples. It confirms CLOSE_WAIT issue also exists. CLOSE_WAIT socks just accumulate and transition to dangling status forever, and are never released unless the process is killed.
Could anyone suggest what should be done to debug/fix this issue? Thanks.
netstat output of EchoClient
tcp 0 0 172.31.38.97:64115 54.118.66.170:8080 FIN_WAIT2
tcp 0 0 172.31.38.97:64117 54.118.66.170:8080 FIN_WAIT2
netstat output of EchoServer
tcp6 0 0 54.118.66.170:8080 172.31.38.97:64115 CLOSE_WAIT
tcp6 0 0 54.118.66.170:8080 172.31.38.97:64117 CLOSE_WAIT
lsof -p 2825 | grep TCPv6
EchoServe 2825 root 20u sock 0,8 0t0 2044556 protocol: TCPv6
EchoServe 2825 root 23u sock 0,8 0t0 2044795 protocol: TCPv6
from wangle.
Just verified the latest code v2020.04.06.00 has the same issue on Ubuntu 16.04.
Running multiple times ./EchoClient from one machine(i.e. 172.31.38.97), ./EchoServer is running from another machine (i.e. 172.26.1.197). When EchoClient is done, many CLOSE_WAIT server socks are lingering there.
Note that tcp_fin_timeout has been tuned on client machine to be long enough (120 seconds) so that EchoServer has the chance to send LAST_ACK.
TCP: About FIN_WAIT_2, TIME_WAIT and CLOSE_WAIT
netstat -anp | grep EchoServer
tcp6 0 0 :::8080 :::* LISTEN 26314/EchoServer
tcp6 0 0 172.26.1.197:8080 172.31.38.97:48758 CLOSE_WAIT 26314/EchoServer
tcp6 0 0 172.26.1.197:8080 172.31.38.97:48756 CLOSE_WAIT 26314/EchoServer
tcp6 0 0 172.26.1.197:8080 172.31.38.97:48762 CLOSE_WAIT 26314/EchoServer
tcp6 0 0 172.26.1.197:8080 172.31.38.97:48754 CLOSE_WAIT 26314/EchoServer
tcp6 0 0 172.26.1.197:8080 172.31.38.97:48770 CLOSE_WAIT 26314/EchoServer
tcp6 0 0 172.26.1.197:8080 172.31.38.97:48764 CLOSE_WAIT 26314/EchoServer
tcp6 0 0 172.26.1.197:8080 172.31.38.97:48760 CLOSE_WAIT 26314/EchoServer
tcp6 0 0 172.26.1.197:8080 172.31.38.97:48766 CLOSE_WAIT 26314/EchoServer
tcp6 0 0 172.26.1.197:8080 172.31.38.97:48768 CLOSE_WAIT 26314/EchoServer
from wangle.
Try to bump this thread. Hey Wangle team, could you please suggest how should it be debugged or fixed? Thanks a lot.
from wangle.
Does Wangle team notice this big issue from user community? Please kindly advice how to fix it or work it around? Appreciated!
from wangle.
You should close the socket after client leaved,use EchoServer as a example
class EchoHandler :public wangle::HandlerAdapter<std::string> {
public:
void read(Context* ctx, std::string msg)override {
std::cout << "handling " << msg << std::endl;
write(ctx, msg + "\r\n");
}
// close the socket
void readEOF(Context* ctx) {
ctx->fireClose();
}
};
from wangle.
Related Issues (20)
- Failed to run example echo examples HOT 3
- ByteToMessageDecoder decode
- error: no member named 'tcpi_retransmits' in 'tcp_info'; did you mean '__tcpi_retransmits'? HOT 3
- Installs empty directories
- if iouring will be supported soon?
- Build fails on Debian Buster: Acceptor.cpp.o SocketPeeker.h:25:67: error: expected class-name before ‘,’ token
- failed to install wangle on windows with vcpkg install wangle command HOT 1
- very poor performance with echo example HOT 1
- Function with noexcept specifier throws exception causes program terminated HOT 3
- enable tcp and udp in single ServerBootstrap HOT 1
- run client on browser
- Wangle - Vcpkg - Windows (wvw)
- Problem linking libsodium HOT 3
- Incompatibility with openssl3 HOT 5
- test failure HOT 1
- Access Pipelines from Server
- MacOS encounter this issue. plz help me with this.
- Q: Does wangle support websockets?
- Acceptor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wangle.