For some reason, calls to websocket.send occasionally take 10s+ in a blocking manner. The amount of data sent is never more than 10K. How is this possible?
It appears to be doing so in a blocking manner because it cannot be timeoutd out with async.wait_for.
await websocket.send(json.dumps(obj))
This is not a duplicate of Python asyncio.sleep takes much longer than expected, which doesn't deal with why websocket.send is slow.