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

Connection timeout errors #698

Open
SukhikhN opened this issue Nov 19, 2021 · 0 comments
Open

Connection timeout errors #698

SukhikhN opened this issue Nov 19, 2021 · 0 comments

Comments

@SukhikhN
Copy link

Hello!

I'm testing my application behaviour with different network timeouts and getting strange error results when unsig hackney with or without connection pool.

First, for testing connection timeout I set up iptables to drop all packets incoming to port 8080:
# iptables -I INPUT -p tcp --dport 8080 -j DROP

Then I try to make requests from the application console:

iex(2)> :hackney.request(:get, "http://localhost:8080", [], "", [pool: false])
{:error, :connect_timeout}
iex(3)> :hackney.request(:get, "http://localhost:8080", [], "", [])           
{:error, :timeout}

As you can see the error reasons are different depending on pool configuration, which seems strange to me - is this correct behaviour?

Also :timeout reason is returned when server is slow to respond - so we can't distinguish response timeout from connection timeout.

I'm testing it using hackney 1.18.0.

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

1 participant