-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
When using Jetty, idle timeout for IO operations and delayed dispatch cannot be set to less than 30000ms #38960
Comments
Any change in this area wasn't intentional but as far as I can tell it continues to be configurable. The configured idle timeout is applied to each of the server's connectors: Lines 115 to 123 in 7216d2b
The result of this can be seen when enabling debug-level logging for
If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue. |
Yes, the connector itself gets configured with the right idle-timeout through the property and the timeout is also applied: But at a later point when the HTTP request is initiated, the timeout gets updated with the value of the Previously in spring-boot Sure, I will create a small example and provide it here for you. |
No need now, thank you. The additional explanation above has made the cause clear. Unfortunately, GitHub's collapsing of larger diffs meant that |
You're welcome, if you need any more help/insight I can provide, please say so. Oh I see, that's a bummer with the large diffs. |
As a short term fix for now, I came up with this:
To override the hardcoded value in the |
Hi @AElmecker Thanks for raising this issue. I encountered the same problem in my springboot 3.2 project and using RestTemplate when calling an external service that takes more than 30 seconds to complete. Can you please explain a bit more about the fix you proposed. Are you creating a bean that extends the JettyWebServerFactoryCustomizer class and override the customize method? I tried to do this but I got application startup-error "A bean with that name has already been defined " |
Update Spring Boot to 3.2.2 for Jetty connection idle timeout fix [spring-projects/spring-boot#38960](spring-projects/spring-boot#38960)
Encountered behaviour
After the upgrade to spring boot
3.2.0
or3.2.1
(jetty 12) the HTTP connections always time out after 30000 ms, regardless of the value set through theserver.jetty.connection-idle-timout
property.It seems that the timeout value was hardcoded during the upgrade to jetty 12 with this change.
Behaviour before upgrade
Previously (with spring-boot
3.1.5
in combination with jetty 11), no http idle timeout was set in theHttpConfiguration
, so the default of jetty is to use the connection idle timeout, set via the propertyserver.jetty.connection-idle-timout
.How to reproduce
If needed, I can provide an example and steps how to reproduce the issue.
Conclusion
Was this change intentional or an oversight?
Either way, imo this idle-timeout should be somehow configurable and not hard-coded.
The text was updated successfully, but these errors were encountered: