spring-projects / spring-projects/spring-session
RedisConnectionFailure because of Spring Session inactivity
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 55
Description
Hi @rwinch ,
We are using Spring Session 1.1.1 and have set a timeout of 30 minutes.
After the application is inactive for about 20 minutes ( for example) , when i come and access something on the application, I get the RedisConnectionFailure exception. But this is very inconsistent as immediately if I make the request again, it works. Any idea why this might be happening?
{"error":"Internal Server Error","exception":"org.springframework.data.redis.RedisConnectionFailureException","message":"Unexpected end of stream.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream."}
Also, request.getSession(false) throws null, even when session exists at times!
Regards,
Adith Shenoy
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 by reproducing the intermittent RedisConnectionFailureException after inactivity with Spring Session 1.1.1, focusing on the request that first accesses the application and on request.getSession(false). Trace the Redis session access and connection lifecycle using the available logs. Done means identifying the cause of the dropped connection or missing session and documenting a verified fix or reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis, spring
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100