-
Notifications
You must be signed in to change notification settings - Fork 494
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
Timout in async and sync DoH query #978
Comments
This one seems to be a limitation in the way timeouts work in httpx/httpcore. I'm seeing the correct timeout value get passed into httpcore, but the API only has the concept of individual operation timeouts. I see it trying to get the body of the response, and constantly reading 16KiB chunks of data, and this seems to go on for some time, certainly longer than the 6 second lifetime timeout we would like. I am not sure how to fix this for the sync API, but for async I can fix it by limiting how long we wait for the future. E.g. if I do this:
it returns after 6 seconds. I can move that kind of logic into dns.asyncquery.https(). |
according to the timeout [#978]. Unfortunately we do not currently have a good way to make this guarantee for sync https() calls.
Thank you! |
I'm leaving this ticket open so we remember to fix this for sync if httpx gives us a way to do so in the future. I made fixes for asyncio and trio, and they were included in the 2.4.2 release. |
Sometimes timeout in dns.asyncquery.https and dns.query.https doesn't work as expected, when querying server 75.119.137.220, which in fact isn't a DoH server, it will never timeout, it will hang at calling the_client.get or the_client.post method.
To Reproduce:
System info:
The text was updated successfully, but these errors were encountered: