Skip to content

Timeout issues with httpx.AsyncClient on a large number of requests (around 100k domains) #3338

Discussion options

You must be logged in to vote

I continued investigating. After ruling out errors potentially caused by the operating system, I can confirm that it was indeed a rate-limiting policy imposed by the DNS servers. Aiohttp allows specifying a list of nameservers (via AsyncResolver passed to TCPConnector), which helps bypass the machine's DNS resolution settings and distribute the load across multiple servers.

This experience made me realize that httpx could improve by offering clearer error messages, especially for DNS-related issues, and by allowing users to specify custom DNS servers for resolution.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@loic-bellinger
Comment options

@tomchristie
Comment options

@loic-bellinger
Comment options

@loic-bellinger
Comment options

Answer selected by tomchristie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants