responseHeaderTimeout should be < idleTimeout
See original GitHub issueThe BlazeServerSpec
says “A server should return a 503 if the server doesn’t respond” and it works like that in the test, but it does only because response header time-out is set to 1 second. The default for responseHeaderTimeout
is 1 minute while the default for idleTimeout
is 30 seconds (see: BlazeServerBuilder ). That means that when running with default configuration, the idleTimeout
kicks in first, and instead of the nice behaviour of returning HTTP 503 response, we get an abrupt TCP connection termination, leaving the client with no clue what went wrong.
IMO the defaults for the timeouts should be changed so that the responseHeaderTimeout
is shorter than the idleTimeout
. In addition to that, the blaze server could log a warning it is started with responseHeaderTimeout >= idleTimeout
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (5 by maintainers)
Top GitHub Comments
I think this can be closed as of https://github.com/http4s/http4s/pull/2746.
If the response gets canceled by the service itself it should say so IMO otherwise one will never be able to distinguish between these different scenarios.