-
Notifications
You must be signed in to change notification settings - Fork 1.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
HttpConfiguration.setIdleTimeout() breaks long running requests #10229
Comments
Unintentional change. We know that the servlet spec requires that long running requests are not interrupted by idle timeout.... however, we struggle to not close the connection under them sometimes. |
I've created draft PR #10233 that has a unit test that reproduces the problem. Note that I also do not like the NPE that is suppressed, so there are at least 2 issues to fix. |
Added test that idle works between requests
Handle idleTimeout for IO operations differently
fixed test to not expect timeout listener to be called if there is demand
Idle timeouts for IO operations are not last.
Disable transient idle timeouts since AsyncContentProducer cannot handle them.
* Fix #10229 Idle Timeout Added test to reproduce Fixed NPE if no failure listener Possible Added test that idle works between requests EE9 idle timeout idle if read operation Handle idleTimeout for IO operations differently improve comments fixed test to not expect timeout listener to be called if there is demand Idle timeouts for IO operations are not last. Disable transient idle timeouts since AsyncContentProducer cannot handle them. revert test to persistent idle failures
Prefer the wrapped servlet request/response
Do not use Wrappers for the wrapped servlet request/response
Jetty version(s)
12 beta 4
Java version/vendor
(use: java -version)
17
OS type/version
Windows
Description
I am not sure whether this might be intentional or not. But it looks more like a bug to me or at least like an unexpected change in Jetty 12.
From my understanding HttpConfiguration.idleTimeout refers to timeout in IO operations, not long running application code. In my code i was setting idleTimeoutout in Jetty 9 and 10 without any issues but with Jetty 12 long running request fail this error when the application code takes longer than the idleTimeout. Also note the suppressed NPE
HTTP ERROR 500 java.util.concurrent.TimeoutException: Idle timeout expired: 5015/5000 ms
Caused by:
How to reproduce?
The text was updated successfully, but these errors were encountered: