New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak at SocketSessionManager.socketSessions #456

Closed
THKDev opened this Issue Apr 16, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@THKDev

THKDev commented Apr 16, 2018

After a test over two days SocketSessionManager.socketSessions contains over 100000 entries. It seems that this Map will never be cleared.
All user specific sockets are hold until server will be restarted.

<o:socket channel="userchannel" user="#{Bean.userIdentifierer}"/>

Maybe it is also possible to adjust memory footprint of ConcurrentHashMap regarding this suggestion.

Thank you and kind regards
Thomas

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Apr 16, 2018

Member

They are only removed when a socket is closed.

How exactly did you test it? Which server are you running on?

Member

BalusC commented Apr 16, 2018

They are only removed when a socket is closed.

How exactly did you test it? Which server are you running on?

@THKDev

This comment has been minimized.

Show comment
Hide comment
@THKDev

THKDev Apr 16, 2018

It is normal load test. Load page ... unload page.
And of course Open and Close socket will be call. Also add and remove will be called. But there is no function with removes a channel from "socketSession". There is no counter part for register. The method register will be call for every new <o:socket> with a different value of the "user" attribute. After each page load one entry of channelId with an empty ConcurrentLinkedQueue is left.

THKDev commented Apr 16, 2018

It is normal load test. Load page ... unload page.
And of course Open and Close socket will be call. Also add and remove will be called. But there is no function with removes a channel from "socketSession". There is no counter part for register. The method register will be call for every new <o:socket> with a different value of the "user" attribute. After each page load one entry of channelId with an empty ConcurrentLinkedQueue is left.

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Apr 16, 2018

Member

The counterpart is deregister. This is invoked when user session is destroyed. Are sessions correctly destroyed during the test?

Update: ah, I now see, the deregister() should have performed a socketSessions.remove()

Member

BalusC commented Apr 16, 2018

The counterpart is deregister. This is invoked when user session is destroyed. Are sessions correctly destroyed during the test?

Update: ah, I now see, the deregister() should have performed a socketSessions.remove()

@BalusC BalusC closed this in 3b2577c Apr 16, 2018

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Apr 16, 2018

Member

Fixed in both 2.6.10-SNAPSHOT and 3.2-SNAPSHOT. Once the IT has passed, you can get them from Sonatype. Can you retry and let me know?

Member

BalusC commented Apr 16, 2018

Fixed in both 2.6.10-SNAPSHOT and 3.2-SNAPSHOT. Once the IT has passed, you can get them from Sonatype. Can you retry and let me know?

@THKDev

This comment has been minimized.

Show comment
Hide comment
@THKDev

THKDev Apr 16, 2018

First test looks good. Thanks for your fast response! Is there any release date for 2.6.10 ?

THKDev commented Apr 16, 2018

First test looks good. Thanks for your fast response! Is there any release date for 2.6.10 ?

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Apr 16, 2018

Member

Not definitive. Usually we release about every 3 months. Sometimes longer sometimes shorter. 2.6.9 has been released only previous week.

Thank you for reporting!

Member

BalusC commented Apr 16, 2018

Not definitive. Usually we release about every 3 months. Sometimes longer sometimes shorter. 2.6.9 has been released only previous week.

Thank you for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment