spring-projects / spring-projects/spring-session
Redis session has no expiration set on high load
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 55
Description
Describe the bug
Redis sessions with no expiration time are created even if the ReactiveRedisSessionRepository.setDefaultMaxInactiveInterval(Duration) is set. This happens when the app is high loaded
To Reproduce
Let's load the app using JMeter with 75 threads/users. Each request invokes the endpoint that creates a new session using session.changeSessionId(). About 10 minutes later we should notice that among sessions with ttl set, there is a few sessions with no ttl appear
Expected behavior
If ReactiveRedisSessionRepository.setDefaultMaxInactiveInterval(Duration) then all created sessions should have ttl set, even on high loads
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ReactiveRedisSessionRepository.setDefaultMaxInactiveInterval(Duration) and reproduce the issue using JMeter with 75 threads/users, including requests that call session.changeSessionId(). Inspect Redis session TTLs after sustained load; done means every newly created session has the configured expiration, with no sessions lacking a TTL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis, spring
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100