-
Notifications
You must be signed in to change notification settings - Fork 341
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
checkout_timeout after enough http errors #414
Comments
We get the same error, it looks like processes aren't killed by timeout and pool is exhausted:
We are on Erlang/OTP 22 [erts-10.7.1], Elixir 1.10.3 (compiled with Erlang/OTP 21), httposion 1.7 |
Looks like it could have been introduced with version 1.16 of hackney. Several changes were made to the pool in this version: |
We're seeing this issue in one of our production apps and have downgraded hackney to version 1.15.2 through an override. |
and now we're all in a pickle because we can't upgrade to OTP 23 without hackney 1.16… |
Has this issue been resolved? I'm getting it using version 1.7.0 in production. Should I just downgrade? Thanks! |
@overture8 no, its not. the issue is with hackney (benoitc/hackney#643). I would recommend catching |
code for natelesses suggestion for anyone else who isn't too familiar with hackney's API for _ <- 0..100 do
result = HTTPoison.get("http://localhost:3233")
if result == {:error, %HTTPoison.Error{reason: :checkout_timeout}} do
IO.inspect("fixing timeout")
IO.inspect(result)
:hackney_pool.stop_pool(:default)
end
result
end |
…ailed downloads, the pool is (permanently?) exhausted Without this, after we hit a few HTTP errors (which of course NOAA serves us a lot, that's the whole point of this proxy), all (?) future downloads fail with this error: {:error, %HTTPoison.Error{id: nil, reason: :checkout_timeout}} Hackney issue: edgurgel/httpoison#414 More info: benoitc/hackney#643
Just an update for those who don't really track hackney's issues That PR should resolve the issue, if you're willing to test it out, let everyone know over there if it works for you, the more eyes we have on the issue, the faster we can get it merged and pushed upstream (I think) |
It looks like this was included in the 1.17 release, so if you update hackney it will fix the issue. |
When using pools, one :timeout produces :checkout_timeout on all following requests (more than 200). Pool size is default (as I understand is 50). If I set pool: false everything works as expected. It would be nice to use pools for performance reasons... httpoison 1.8 |
UPDATE 2020-06-17: Just realized the title was incorrect
UPDATE 2020-06-10: It appears to be a hackney issue, replacing HTTPoison.get with hackney.get yields the same problem
Sorry if the title isn't descriptive enough, but the jist of it is:
When HTTPoison (or hackney) has enough errors the pool gets completely exhausted and all subsequent requests return checkout_timeout
Test:
You may need to run the above at least twice before it starts happening
Example of the result:
All subsequent request will have a checkout_timeout
I'm not sure if this an HTTPoison or hackney issue at the moment
This test was done in a completely new project (no additional configuration) with only httpoison installed (and it's dependencies)
Versions:
The text was updated successfully, but these errors were encountered: