httpoison icon indicating copy to clipboard operation
httpoison copied to clipboard

checkout_timeout

Open MeterSoft opened this issue 6 years ago • 5 comments

What does this error mean {:error, %HTTPoison.Error{id: nil, reason: :checkout_timeout}}t

MeterSoft avatar Sep 26 '18 12:09 MeterSoft

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

pedep avatar Sep 26 '18 16:09 pedep

Thanks, @pedep !

edgurgel avatar Sep 26 '18 22:09 edgurgel

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?

silva96 avatar Jan 31 '19 12:01 silva96

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

lucaspiller avatar Feb 21 '19 05:02 lucaspiller

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

ijunaid8989 avatar Jul 02 '20 10:07 ijunaid8989