Connection stays ESTABLISHED forever
At server side, there are TCP connections that stay in ESTABLISHED state and they will never change unless the service is restarted. It seems that when the client switches networks (e.g. LTE <-> WIFI), the current established connection will be forgotten and left untouched at the server side.
A potential solution may be enabling the socket keepalive option.
@VictoriaRaymond Is it possible that it's a socket leak? I think this kind of connection will be closed after a timeout?
BTW I set mux=2 at the client side, though I don't know what's the significance.
Does this cause any real problems tho?
The number of connections keep increasing. I usually restart ss before the connection number exceeds 200. Now I have added nginx as the front end, this problem does not bother me for the time being.