-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Application fails to start when server.tomcat.threads.max < 10 #40945
Comments
Thanks for the report. The change in behavior is due to an unanticipated side-effect of #36087. The failure's occurring because the maximum number of threads is less than the minimum number of spare threads. You can avoid it by setting This is necessary with Spring Boot 3.3.0 as Tomcat's no longer creating its executor. When it does create the executor, it calls I'm not sure if we should add similar logic to our creation of the executor. Arguably, having the max threads set to something that's less than min-spare threads is a configuration error and I'm not 100% sure that silently adapting to it is the right thing to do. The counter-argument is that it used to work and it's what Tomcat does by default so we should probably reinstate the old behavior. |
@wilkinsona Thanks, your suggestion works. Our application starts again. I would prefer a solution that either
|
We're going to align with Tomcat default behavior. |
I've opened https://bz.apache.org/bugzilla/show_bug.cgi?id=69133 - if this is resolved, we can switch back to the default executor and set the queue size for #36087 via a normal setter. |
Tomcat has added a setter to set the maximum queue size. When using this setter, this issue should go away. I've opened #41093 for that. |
Since spring-boot 3.3.0 our application fails to start with a similar exception as below. Increasing the max threads of tomcat from 5 to 10 resolves that exception.
The problem occurs as soon as there are under 10 threads configured.
spring-boot 3.2.6 is not affected.
Both versions (3.2.6 and 3.3.0) use the same tomcat version (10.1.24).
Steps to reproduce:
spring-boot-starter-web
dependency)server.tomcat.threads.max=9
The text was updated successfully, but these errors were encountered: