Increase default session timeout longer than default manager heartbeat interval
See original GitHub issueCurrently SessionManager’s default heartbeat is 25 seconds and timeout is 5 seconds.
So if there are no messages for a session within 5 seconds, the connection is closed.
If those are intended defaults, I would like to know why and it should be documented explicitly. If not, session timeout should become longer than heartbeat intervals by default to avoid confusion of new sockjs package users.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Extending the default timeout periods for vCenter Server, ESX ...
Three hours (10800 seconds ) is generally sufficient, but in some environments, you might need to increase the timeout values to a longer...
Read more >Tuning the SIP Session timeout on the Sametime Bandwidth Manager
In the Integrated Solutions Console for the Bandwidth Manager, click Sametime Servers > Bandwidth Manager. Navigate to the “Configuration” tab. Change the “ ......
Read more >Customizing the Session Options
For Heartbeat Timeout, specify the amount of time the system should “wait” before terminating a session when the endpoint does not send a...
Read more >Session timeout does't work vaadin - Stack Overflow
The session timeout should be longer than the heartbeat interval or otherwise sessions are closed before the heartbeat can keep them alive. As ......
Read more >Tuning Server Performance – Logi Analytics
Be sure performance.exe_gc=false as the default in the server.properties file. ... If the heartbeat interval is longer than the session timeout time, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The 5 seconds timeout was taken from nodejs
disconnect_delay: https://github.com/aio-libs/sockjs/commit/b0d7d17646527f89be172c092f9f69c5ffea8a97#diff-c4ae142f5c8b2a63ea9689afef142593They are different parameters. nodejs
disconnect_delaymeans interval to close the transport after client initiates the disconnect but the server does not respond (but it’s also used when initiating the connection): https://github.com/sockjs/sockjs-node/blob/4c9f3009be13962b0785138ccdf527c5abe925f6/lib/session.jsnodejs has a different
heartbeat_delayfor heartbeat, and it’s still different from the timeout: https://github.com/sockjs/sockjs-node/blob/4c9f3009be13962b0785138ccdf527c5abe925f6/lib/transport/websocket.js#L78This was working fine until the heartbeat behavior silently changed: https://github.com/aio-libs/sockjs/commit/9c29e9921f815c0146882abab1240cd80473f4ab#diff-c4ae142f5c8b2a63ea9689afef142593R306
Closing this issue since #265 is merged.