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
Considering that the client has "timeout" set to 5s and the documentation for timeout states "Sets overall timeout for the request", I assume that this is a bug?
If i just uncomment the "sleep" in the server code without packet loss however, we do get the correct timeout of 5 seconds. So it seems like it only occurs when the network itself is slow, but not when the server is slow at handling the request.
request took: 5s
request failed: http://127.0.0.1:1234/get: Network Error: Network Error: Error encountered in the status line: timed out reading response
The text was updated successfully, but these errors were encountered:
Okay, so the "issue" is that there is a default set to 30s for timeout_connect on the Agent, which is applied for the Request as well.
When you look at the documentation for the AgentBuilder, it is very clear exactly how this works
This takes precedence over .timeout_read() and .timeout_write(), but not .timeout_connect().
I'd consider this just to be hard to read docs, it's not really a bug. It was my fault for not reading the last part of the sentence in the documentation that i cited before
Sets overall timeout for the request, overriding agent’s configuration if any.
I have a case where the timeout is not respected.
First, the examples
server
client
Just running it like this works fine, we get the following output:
However, when adding insane synthetic packetloss on the server side like this, we get the following
Considering that the client has "timeout" set to 5s and the documentation for timeout states "Sets overall timeout for the request", I assume that this is a bug?
If i just uncomment the "sleep" in the server code without packet loss however, we do get the correct timeout of 5 seconds. So it seems like it only occurs when the network itself is slow, but not when the server is slow at handling the request.
The text was updated successfully, but these errors were encountered: