Possible hang in websocket server after send large amount of data #7387
Unanswered
FindDefinition
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm experience a strange bug in a aiohttp websocket server <-> browser websocket application. this app works well for small payload. When I send large data (~100MB, 4MB chunk size) to browser client, the server may hang with a low probability (<5%). when the hang happens:
send_bytes
method.the server and client runs on same localhost. This problem still exists if I use
blacksheep
+uvicorn
(they usewebsockets
).My server app looks like this:
in app above, the event send task and websocket task are run simultaneously (via
asyncio.gather
). Only threeaiohttp
apis are used in websocket service:prepare
,async for msg in ws
andsend_bytes
.any suggestion about this problem?
python: 3.8
aiohttp: 3.8.4
OS: ubuntu 20.04
Beta Was this translation helpful? Give feedback.
All reactions