Prior to this change, if connection rate is limited, the acceptors will enter suspending state and stop accepting the sockets leaving the sockets in the system backlog.
If the acceptor backlog (default=1024) is filled up, for long enough time to cause the majority of the clients to have closed socket from their end and try to reconnect aggressively, the acceptor may never be able to get a normal socket again.
The fix is: in suspending state, accept the sockets and immediately close them to free up the backlog.
The close triggers TCP-RST to cut the TCP graceful close overheads.
Fixes: https://github.com/emqx/emqx/issues/14145
Prior to this change, if connection rate is limited, the acceptors will enter suspending state and stop accepting the sockets leaving the sockets in the system backlog.
If the acceptor backlog (default=1024) is filled up, for long enough time to cause the majority of the clients to have closed socket from their end and try to reconnect aggressively, the acceptor may never be able to get a normal socket again.
The fix is: in suspending state, accept the sockets and immediately close them to free up the backlog. The close triggers TCP-RST to cut the TCP graceful close overheads.