You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into basically the same issue as encode/httpx#527. When running client requests concurrently, the request ends up throwing with a stack trace like below
This tends to happen when I run two client methods concurrently. For example, when I run the following snippet 1000 times, it would throw the above error around 40% of the time.
bar, foo, zed=awaitasyncio.gather(
thrift_client.get_bar(...),
thrift_client.get_foo(...),
thrift_client.get_zed(...)
)
Since all requests share the same StreamReader, I wonder if when we make requests concurrently, it's possible we end up calling self._wait_for_data('read') from a second request that also tries to run another read coroutine? Has anyone run into this before? The folks working on httpx got around it by adding a lock around trying to read from the stream.
The text was updated successfully, but these errors were encountered:
I'm running into basically the same issue as encode/httpx#527. When running client requests concurrently, the request ends up throwing with a stack trace like below
This tends to happen when I run two client methods concurrently. For example, when I run the following snippet 1000 times, it would throw the above error around 40% of the time.
Since all requests share the same StreamReader, I wonder if when we make requests concurrently, it's possible we end up calling
self._wait_for_data('read')
from a second request that also tries to run anotherread
coroutine? Has anyone run into this before? The folks working on httpx got around it by adding a lock around trying to read from the stream.The text was updated successfully, but these errors were encountered: