question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

responseHeaderTimeout should be < idleTimeout

See original GitHub issue

The 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
armanbilgecommented, Jul 3, 2022

I think this can be closed as of https://github.com/http4s/http4s/pull/2746.

0reactions
sergiojoker11commented, Dec 2, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

responseHeaderTimeout should be < idleTimeout · Issue #2550
The BlazeServerSpec says "A server should return a 503 if the server doesn't respond" and it works like that in the test, but...
Read more >
BlazeClientConfig - http4s
Does not include time to read the response body. idleTimeout. duration that a connection can wait without traffic being read or written before...
Read more >
The complete guide to Go net/http timeouts
In this post I'll take apart the various stages you might need to ... ResponseHeaderTimeout limits the time spent reading the headers of...
Read more >
http4s/http4s - Gitter
It is recommended to configure responseHeaderTimeout < requestTimeout < idleTimeout or disable some of them explicitly by setting them to Duration.Inf.
Read more >
Global Configuration - Traefik Labs
Idle Timeout (deprecated)¶. Use respondingTimeouts instead of idleTimeout . In the case both settings are configured, the deprecated option will be overwritten.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found