question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

closeIdleSessions=true does not allow HTTP session to expire

See original GitHub issue

Vaadin 14.0.10 Configuration

vaadin.heartbeatInterval=10
server.servlet.session.timeout=90
vaadin.closeIdleSessions=true
vaadin.compatibilityMode = false 

After 90 seconds there is a new VaadinSession, but the HTTP session id is the same. Tried with

vaadin.heartbeatInterval=120
server.servlet.session.timeout=90
vaadin.closeIdleSessions=true
vaadin.compatibilityMode = false 

After 90 seconds there is a new VaadinSession, and the HTTP session id changes. Sample application:

public MainView() {
    add(new Span(VaadinSession.getCurrent().getSession().getId()+" "+VaadinSession.getCurrent()));
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
mvysnycommented, Jun 17, 2020

What is the value of only destroying Vaadin Session but not Servlet session?

With these settings:

vaadin.heartbeatInterval=10
server.servlet.session.timeout=90
vaadin.closeIdleSessions=true

I’d expect the HTTP session to be closed eventually; perhaps not after 90 seconds but after 90s+3*heartbeats; I’d expect Vaadin to close+detach+disconnect UIs after three missed heartbeats.

The current status and documentation is creating a lot of confusion. Would it be possible to create a list of concrete cases and how Vaadin would react?

3reactions
fschoncommented, Sep 8, 2020

It would be really great if someone could link to some working code to achieve what the original posted actually wanted. i have been trying for years to get this right and there is just a lot of misinformation out there now.

What do I need to do to expire a vaadin session (together with its http session) after say 30 minutes of the user staring at the screen not touching a thing? That way the http session can be released, load balancers can start to work, the users session will automatically log out during lunch times making the system data safer.

Just saying that the code is working as designed doesn’t help any reader of this issue on how to solve the actual issue the posted asked.

Please help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Http Session is not expiring - java - Stack Overflow
I have remote debugged the code and made sure that this code is executed on successful authentication. The problem I am facing is...
Read more >
Resolve session expired errors in Amazon Connect
Session expired Your session has expired. Please log in again to continue. Sessions expire after 12 hours. To resolve the error, you must...
Read more >
Setting the idle session timeout - IBM
If you set TOKEN_REFRESH_PERIOD: "1" and the user's session does not expire, the user's session is automatically refreshed during this 60 minute period....
Read more >
How to Fix Session Has Expired Error on the Internet
A website session duration is measured and managed on the server, not on your computer. Therefore, you cannot modify the remaining time of...
Read more >
Http and Jalo sessions expiration - SAP Community
Hi all, This is about Http-Jalo sessions Handling in hybris 5.2 I know that the mecanism described above is no longer the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found