Skip to content

Conversation

dawnbreaks
Copy link
Contributor

release inactive long-polling channel from ClientsBox to avoid memory leak

@dawnbreaks
Copy link
Contributor Author

Hi, there is memory leak issue in our prod environment. We analyzed the heap dump, and found that the ClientsBox consumed huge memory. Inactive Channels had not be released from ClientsBox.

@mrniko
Copy link
Owner

mrniko commented Jul 4, 2018

Would you review my comments?

@dawnbreaks
Copy link
Contributor Author

Where 's your comments?

Copy link
Owner

@mrniko mrniko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the code which I commented

log.debug("channel inactive {}", client.getSessionId());
client.onChannelDisconnect();
}
channel.close();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dawnbreaks You don't need to invoke channel close() method.

@dawnbreaks dawnbreaks force-pushed the master branch 3 times, most recently from bc2ac28 to 664df09 Compare July 4, 2018 09:35
@dawnbreaks
Copy link
Contributor Author

Hi, please review the code again, thanks very much.

@mrniko mrniko merged commit f501f9e into mrniko:master Jul 4, 2018
@mrniko
Copy link
Owner

mrniko commented Jul 4, 2018

Thank you!

@mrniko mrniko added this to the 1.7.16 milestone Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants