Skip to content
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

{:error, %HTTPoison.Error{id: nil, reason: "closed"}} #503

Closed
lypborges opened this issue Apr 22, 2018 · 2 comments
Closed

{:error, %HTTPoison.Error{id: nil, reason: "closed"}} #503

lypborges opened this issue Apr 22, 2018 · 2 comments

Comments

@lypborges
Copy link

I’m getting a strange error in HTTPoison. When I do two request to a server “A” in the second I get connection close.

HTTPoison.get("http:/urla.com", [], [ ssl: [{:versions, [:'tlsv1.2']}] ,  hackney: [pool: :mypool],  max_connections: 1000])

When I do this with other server it works.

HTTPoison.get("http:/google.com", [], [ ssl: [{:versions, [:'tlsv1.2']}] ,  hackney: [pool: :mypool],  max_connections: 1000])

So I think it was a error on the server “A” , so a did a manual call with curl 20 times and all work perfect in the server “A” and “B”.

curl http://urla.com\?\[1-20\]

I tried with the default options and with the options above [ ssl: [{:versions, [:'tlsv1.2']}] , hackney: [pool: :mypool], max_connections: 1000]. But I get the same error.
Any tip what could be the error?

@dkuku
Copy link

dkuku commented Apr 11, 2021

I got the exact same problem with HTTPPoison and I tracked it to hackney

iex(0)> :hackney.get "https://www.sejm.gov.pl/"
{:error, :closed}

iex(1)> System.cmd("curl", ["https://www.sejm.gov.pl/"])
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
100 16314  100 16314    0     0  16905  

I raised also an issue in HTTPPoison that it should handle this error better: edgurgel/httpoison#432

@benoitc
Copy link
Owner

benoitc commented Apr 21, 2021

update to latest certifi.... also ensurz to use latest version of hackney.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants