netty-socketio icon indicating copy to clipboard operation
netty-socketio copied to clipboard

[BUG] Possible for leaking memory

Open kevinhuangwl opened this issue 5 years ago • 2 comments

Problem scenario: When a client join a specific room other than default namespace, then disconnect without leaving the room that was joined before, the record would not be clear out automatically, which consequently might lead to OOM as cases like this accumulated. This theory can be easily proved by a simple test.

Suggestion: On the method onDisconnect of class Namespace, add automatically clear out procedure by iterating every room that the disconnecting client was in, and leave.

kevinhuangwl avatar Apr 20 '19 14:04 kevinhuangwl

我也遇到了这个问题

yangminglive avatar Jul 17 '19 07:07 yangminglive

Hi, was debugging a memory leak on our production servers, and looks like I'm running into this have tried out the change suggested above, and things seem to work fine, will test more and raise a PR here since, BulkJoinLeave was implemented, we can leverage it to send an event to Bulk Leave for all the joined rooms at once

ksahu750 avatar Jul 21 '23 14:07 ksahu750