-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
timeout not working? #290
Comments
This should be causing a |
Does a timeout value need to be passed to HTTPConnection when you create one? When I create an httpconnect object without passing timeout to it, it uses the default timeout for a new socket. But that is after the connect attempt has already been made, but before reading. So it is more of a read timeout than a connection timeout. Maybe pass a timeout value on the _new_conn creation of an HTTPConnection?
related code in python httplib module where timeout is set if passed to class on init. |
This seems to be partially fixed in urllib3/urllib3#17. But when calling I´ve created an issue and a pull request (urllib3/urllib3#23) to get this fixed. |
..and now it is merged in. Is there a strategy for merging in new changes from urllib3? |
just updated it :) the 'make deps' command pulls it in, for now. I'm technically a fork though, so use sparingly. |
Aha, I see. Missed that detail. (-: Tested the |
Excellent! I'll try to roll a release tonight. |
great! :D |
Released! |
I'm experiencing this issue myself, but only when a DNS lookup is needed. Using cactus's code above:
The two requests requiring DNS lookups also output: |
I'm seeing the same behaviour on v2.13.0. |
@wanaryytel Please do not comment on old issues (this issue was originally opened in 2011, more than five years ago) to suggest you are seeing vague problems like "timeouts not working". The last comment here was made almost five years ago, and any problem you are seeing now is going to be entirely unrelated to this one. If you are having an issue, either look for newer issues that replicate your problem or open a new one. I should note, by the way, that "I am seeing the same problem" is using a few more words to say "+1", and is not hugely helpful. I highly recommend being a bit clearer about what problem you are seeing, and how you are triggering it. The more information you can give us, the more likely it is that you will see a resolution to your problem. |
It seems that timeouts are not working when the host cannot be reached. It appears that the standard socket timeout timeframe is being used (I get similar timings with timeouts via telnet to the same non listening host/port for example).
The text was updated successfully, but these errors were encountered: