I am running a service to proxy the request from the application to the embedded devices. But I have some problems with Yamux. It creates many connections in some devices that have network problems, despite enabling keep-alive. When I use the tcpdump command to check packets, only the real connection has a keep-alive packet between the client and server; all the other connections do not have anything. I think some things are stuck in the keep-alive poll. Could anyone please give me some suggestions to fix it?
Currently, the server has 8000 Yamux sessions. The zombie connection is still increasing, which causes a memory leak on my server.
My server
OS: Ubuntu
Hardware: 2 cores and 2 GB of RAM.