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
Since the update, we started getting random exceptions from httpcore/anyio. The error is usually about not awaited future returning BrokenResourceError exception.
Here is an example from our sentry log:
MESSAGE
Future exception was never retrieved
future: <Future finished exception=BrokenResourceError()>
EXCEPTION(most recent call first)
App Only
Full
Raw
ConnectionResetError: [Errno 104] Connection reset by peer
File "asyncio/selector_events.py", line 848, in _read_ready__data_received
data = self._sock.recv(self.max_size)
BrokenResourceError: null
File "httpcore/_exceptions.py", line 8, in map_exceptions
yield
File "httpcore/_backends/anyio.py", line 154, in open_tcp_stream
stream = await TLSStream.wrap(
File "anyio/streams/tls.py", line 94, in wrap
await wrapper._call_sslobject_method(ssl_object.do_handshake)
File "anyio/streams/tls.py", line 109, in _call_sslobject_method
data = await self.transport_stream.receive()
File "anyio/_backends/_asyncio.py", line 1095, in receive
raise self._protocol.exception
Our usage is simple and I audited and make sure all calls to httpx.AsyncClient were properly awaited. This never happened before the upgrade, with the old asyncio backend. (I saw that we made anyio the new default since ) #345
I'm wondering if you may know the possible causes of this symptom? (trying to get more signal to debug this)
Activity
lovelydinosaur commentedon Aug 12, 2021
Not sure, but first step would be to double check that
httpcoreis also up to date.kangzhang commentedon Aug 13, 2021
It seems there is another issue #382 filed with the same problem. We should discuss there maybe.