httpoison
httpoison copied to clipboard
checkout_timeout
What does this error mean
{:error, %HTTPoison.Error{id: nil, reason: :checkout_timeout}}t
Seems like you are using connection pools, and they time out
https://github.com/benoitc/hackney/blob/daf085bbe673476cca05b76f99fa9d13ce2b69f5/src/hackney.erl#L242-L243
{checkout_timeout, infinity | integer()}: timeout used when checking out a socket from the pool, in milliseconds. Default is 8000
more here https://github.com/benoitc/hackney/blob/cf15810d709028421cd836272f14aa50f9058091/src/hackney_pool.erl#L64-L87
Thanks, @pedep !
Hi, I'm having the same error sometimes but I haven't configured any specific pool, I just want HTTPoison to be able to do unlimited request in parallel, how do I achieve this?
The cause of this is the hackney documentation not being clear (see https://github.com/benoitc/hackney/issues/507). If you don't specify any pool option, it will use the default pool. You can disable this functionality by adding this to your environment configuration:
config :hackney, use_default_pool: false
I have this
:hackney_pool.child_spec(:snapshot_pool, [timeout: 5000, max_connections: 1000]),
:hackney_pool.child_spec(:seaweedfs_upload_pool, [timeout: 5000, max_connections: 1000]),
But i am still getting the same issue