Skip to content

cleanupExpiredSessionsTask will never run again when exception ocurred in cleanUPExpiredSession method #3426

@tradeshark

Description

@tradeshark

Describe the bug
In ReactiveRedisIndexedSessionRepository class, when cleanUpExpiredSession method has exception,like the following stacktrace,the interval task will terminated ,not run next time:

2025-06-20 15:35:18.138 [TID: N/A] [lettuce-eventExecutorLoop-3-1] ERROR reactor.core.publisher.Operators -Operator called default onErrorDropped org.springframework.dao.QueryTimeoutException: Redis command timed out; nested exception is io.lettuce.core.RedisCommandTimeoutException: Command timed out after 5 second(s) at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:70) Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Assembly trace from producer [reactor.core.publisher.MonoError] : reactor.core.publisher.MonoNext$NextSubscriber.onError(MonoNext.java:93) io.lettuce.core.RedisPublisher$ImmediateSubscriber.onError(RedisPublisher.java:891) Error has been observed at the following site(s): *__MonoNext$NextSubscriber.onError ⇢ at io.lettuce.core.RedisPublisher$ImmediateSubscriber.onError(RedisPublisher.java:891) *__________________Flux.onErrorMap ⇢ at org.springframework.data.redis.connection.lettuce.LettuceReactiveRedisConnection.execute(LettuceReactiveRedisConnection.java:224) |_ Flux.next ⇢ at org.springframework.data.redis.connection.ReactiveKeyCommands.exists(ReactiveKeyCommands.java:176) |_ Mono.map ⇢ at org.springframework.data.redis.connection.ReactiveKeyCommands.exists(ReactiveKeyCommands.java:176) *___________________Flux.usingWhen ⇢ at org.springframework.data.redis.core.ReactiveRedisTemplate.doInConnection(ReactiveRedisTemplate.java:242) |_ Mono.from ⇢ at org.springframework.data.redis.core.ReactiveRedisTemplate.doCreateMono(ReactiveRedisTemplate.java:220) |_ Mono.then ⇢ at org.springframework.session.data.redis.ReactiveRedisIndexedSessionRepository.touch(ReactiveRedisIndexedSessionRepository.java:336)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions