-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Checklist
- The bug is reproducible against the latest release and/or
master. - There are no similar issues or pull requests to fix it yet.
Describe the bug
I tried looking through GitHub issues and documentation for an explanation of how to increase this limit but did not find any answers. We use httpx.AsyncClient(http2=True) Async client with HTTP/2 in high concurrency scenarios, although I observed the same error with http2=False. It is necessary to keep many streams open when the target website goes into queue mode. At this point, if running more than 100 concurrent requests, we encounter this error. How can we resolve it?
I have tried initializing the AsyncClient with httpx.Limits(max_connections=None, max_keepalive_connections=None) but this did not make a difference.
To reproduce
Will provide upon request, this seems more of a design/conceptual problem where reproducible POC may not be necessary
Expected behavior
Client can configure the maximum number of outbound streams.
Actual behavior
Client is provided with error about maximum streams and request fails.
Debugging material
n/a
Environment
- OS: Windows
- Python version: 3.8.2
- HTTPX version: 0.16.1
- Async environment: Only observed in Asyncio, have not tested trio
- HTTP proxy: Yes - not feasible to perform this many connections without proxy, it will result in HTTP errors
- Custom certificates: no
Additional context
Issue was somewhat acknowledged in #832 but there was no resolution provided.
How can we increase the streams limit or otherwise work around the issue here?