-
Notifications
You must be signed in to change notification settings - Fork 339
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
Confusion around when to use timeout vs recv_timeout #215
Comments
Yeah the struggle is real: #211 The only way to solve this issue is to patch hackney so that it will provide the correct timeout error. |
@edgurgel hackney returns iex(2)> :hackney.request(:get, 'http://google.com', [], [], [{:connect_timeout, 1}])
{:error, :connect_timeout}
iex(3)> :hackney.request(:get, 'http://google.com', [], [], [{:recv_timeout, 1}])
{:error, :timeout} so this should be doable. Edit: I'm guessing the confusion is because the HTTPoison option |
Any plans to do anything further with this? I think the new(-ish) docs around setting
I might be able to carve out some time to do number 3. |
Getting
{:error, %HTTPoison.Error{id: nil, reason: :timeout}}
in about 6 seconds with my options set as[timeout: 30_000]
. After much digging and confusion, it seems that the timeout is stemming fromrecv_timeout
being too low. I found this confusing for 2 reasons:reason: :timeout
is reported, which suggests that thetimeout
is the appropriate option to adjust.timeout
vsrecv_timeout
are pretty vague... I'm still not sure exactly what each one does and how they are different.The text was updated successfully, but these errors were encountered: