-
Notifications
You must be signed in to change notification settings - Fork 38k
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
ThreadPoolTaskExecutor rejecting tasks as soon as the context has been closed can lead to exceptions during web app shutdown #32226
Comments
Schedulers remain strict on shutdown (otherwise the triggers would keep firing while we wait for all tasks to complete), just plain executors are lenient on shutdown now. An early shutdown for executors with strict rejecting of further task submissions can be enforced via |
Affects: 6.1.3
As discussed with @jhoeller, spring-projects/spring-boot#39469 has highlighted a problem with
ThreadPoolTaskExecutor
rejecting tasks once it has received aContextClosedEvent
. In a Spring Boot web application this creates a window where the task executor cannot be used but the web server is still accepting requests. Those requests will fail if they try to use the executor.The text was updated successfully, but these errors were encountered: