-
Notifications
You must be signed in to change notification settings - Fork 40.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis Connection Factory Earlier Graceful Shutdown after Spring 3.2 Upgrade #39501
Comments
Thanks for the report but this is out of Spring Boot's control. @christophstrobl @mp911de can you please point @emindeniz99 in the right direction? |
@wilkinsona Thank you very much, I looked into the links that you mentioned, but I could not find any solution to support the old behavior spring bean lifecycle. I will open the issue at |
Please be patient, @emindeniz99. The Spring Data team are very busy at the moment and I was hoping for some guidance from them before another issue was opened in potentially the wrong repository. |
Problem
We have upgraded spring boot version from 3.0.5 to 3.2.2. After that, we experience a graceful shutdown issue with our predestroy logic that makes Redis calls.
The new spring version changes the order of destruction for
RedisConnectionFactory
, they are destroyed earlier than dependent services.2024-02-09 14:59:16,243 - WARN - CommonAnnotationBeanPostProcessor - Destroy method on bean with name 'redisEarlyClosedDependencyIssueService' threw an exception java.lang.IllegalStateException: LettuceConnectionFactory has been STOPPED. Use start() to initialize it
Reproduce
Specs
Spring Boot spring-boot-starter-parent, spring-boot-starter-web, spring-boot-starter-data-redis 3.2.2
Graceful Shutdown Console Output (spring log level: trace)
Related Issues
ThreadPoolTaskExecutor rejecting tasks as soon as the context has been closed can lead to exceptions during web app shutdown spring-framework#32226
The text was updated successfully, but these errors were encountered: