You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
I think the defaults could be adjusted to have fewer people experience the constant timeout as seen by #135 .
There are two timers in a cache. One is the read timeout, which is how long OkHttp will wait for a response (OkHttp default is 10s). The second is the blocking request wait time, and consul-client default is also 10s.
A small random amount of additional wait time is added to the supplied maximum wait time to spread out the wake up time of any concurrent requests. This adds up to wait / 16 additional time to the maximum duration.
What's happening is that that jitter makes Consul reply in slightly longer than 10s, which makes OkHttp time out with the ugly exception seen in #135.
I suggest making the default watchSeconds value 8s, so that this extra jitter (plus a little margin) makes it much less likely for default OkHttp configs to cause time outs.
The text was updated successfully, but these errors were encountered:
Hi @alugowski ,
I think that #289 fixed your issue, and it can be closed.
Instead of setting the default watch to 8 seconds, it increased the timeout depending on the wait duration.
I think the defaults could be adjusted to have fewer people experience the constant timeout as seen by #135 .
There are two timers in a cache. One is the read timeout, which is how long OkHttp will wait for a response (OkHttp default is 10s). The second is the blocking request wait time, and
consul-client
default is also 10s.But see this in the Consul blocking queries docs (https://www.consul.io/api/index.html#blocking-queries):
What's happening is that that jitter makes Consul reply in slightly longer than 10s, which makes OkHttp time out with the ugly exception seen in #135.
I suggest making the default
watchSeconds
value 8s, so that this extra jitter (plus a little margin) makes it much less likely for default OkHttp configs to cause time outs.The text was updated successfully, but these errors were encountered: