spring-projects / spring-projects/spring-session

Spring web session expire when no message is sent by websocket over timeout period eventhough heartbeat is configured.

Open
#1,537 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

When we use spring session with websocket, the spring web session expires when the is no message sent by web socket over configured session timeout period (default 30 min ), even though spring web socket is configured with heartbeat at every 25 second (stomp) . It seems to be as per design. Documentation also says same thing.

Expectation: It should be able to keep spring web session alive when there is heartbeat configured to spring web socket. It should not only depend on message being sent from web socket. It should also take web socket heartbeat into consideration to keep web session alive.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Spring Session and Spring WebSocket documentation referenced in the issue, then trace how WebSocket activity updates the session timeout and how STOMP heartbeats are handled. Done means a configured heartbeat keeps the Spring web session alive during otherwise idle periods, with regression coverage for the reported timeout scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.