-
Notifications
You must be signed in to change notification settings - Fork 6
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
idleTimeout does not work with Jetty backend #3
Comments
Fixes #833. The timeout is now a parameter when running the server, which is hard-coded to infinity for real life, and set to 1 second in tests. This required switching to the Blaze backend (probably a good thing anyway), because of a bug in the Jetty backend that we were using (see http4s/http4s#336). That required a workaround for the bug in the Blaze backend that was the reason we went with the Jetty backend in the first place (see http4s/http4s#337). Disabled our `FailSafe` middleware, which was only necessary due to another bug in the Jetty backend (see http4s/http4s#338). Moved the http4s dependencies to the web sub-project, and bumped the version to 0.8.3 for good measure.
I get this same behavior mounting a raw |
This used to work, but was lost along the way. We need to set it on the async context, and then actually run the timeout renderer. Relates to #336.
This seems more like a use case for I can't make the idle timeout work, even removing http4s from the picture. That setting doesn't seem to do what I'm reading it to do. |
Could be. I observed Part of the problem here is the lack of any documentation of what these parameters are meant to do, and part of the problem is the inconsistent behavior across the backends. To be safe, should I be using |
@mossprescott, I don't think the blaze server supports the notion if an |
The idea is that This is going to be a constant struggle with abstracting the backends. The servlet specification does not have much to say about connection lifecycles, which naturally gives rise to some differences between Jetty and Tomcat. Blaze, being under our control can mimic a servlet container's capabilities where desired. But then which container's? The idea is for the server builders to identify similar behaviors between backends and give them the same name. We'll fill the holes in this abstraction the best we can, but I think it's doomed to leak at least a little. |
We do need a 'took too long to initiate the response' timeout for blaze that will return a default response of some form, preferable with a good default but can be set by the user. I don't know if that is what the |
The |
Actually, our requirement was just to effectively disable anything like From the http4s user's point of view, It would be helpful if there was a consistent and documented set of tuning parameters, even if they aren't all supported by all the backends. Secondarily, the behavior of the Jetty backend returning 200 OK after timing out is confusing and wrong (see also http4s/http4s#337). Hopefully that's something that can be addressed in http4s. |
This used to work, but was lost along the way. We need to set it on the async context, and then actually run the timeout renderer. Relates to http4s/http4s#336.
This used to work, but was lost along the way. We need to set it on the async context, and then actually run the timeout renderer. Relates to http4s/http4s#336.
When a service yields a task that takes a long time to produce a response (see
/slow
in the code below), the Blaze backend will drop the socket afteridleTimeout
has elapsed. The Jetty backend:idleTimeout
.Using http4s 0.8.2.
The text was updated successfully, but these errors were encountered: