Skip to content
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

SockJS Event Bus Bridge does not keep web sessions alive for clustered session managers #2600

Open
cgm-aw opened this issue Apr 25, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@cgm-aw
Copy link

cgm-aw commented Apr 25, 2024

Version

>= 4.5.0 (older are probably also affected)

Context

When using the SockJS event bus bridge, EventBusBridgeImpl#internalHandlePing keeps the web session alive by calling Session#setAccessed
However this only works for a local session storage. ClusteredSessionStoreImpl does not honor Session#lastAccessed but rather uses the TTL feature of AsyncMap.

Do you have a reproducer?

Yes please check out https://github.com/cgm-aw/vertx-sessiontimeout-reproducer

Steps to reproduce

  1. Deploy a verticle with a clustered session manager
  2. Perform a http call, you will get a web session
  3. Open a SockJS connection and utilize the event bus bridge so the periodic ping happens
  4. Wait until the configured session timeout is over
  5. Perform another http call, you will get a new web session <- the ping should have kept the original session alive

Please check out my reproducer, you can reproduce the issue and also see how the mechanism works fine with the local session storage.

Best regards

@cgm-aw cgm-aw added the bug label Apr 25, 2024
@tsegismont tsegismont self-assigned this May 24, 2024
@tsegismont tsegismont added this to the 4.5.9 milestone May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants