Connection timeouts not enforced in AsyncClient under heavy load #1160
-
Hi, I am experiencing a problem with the AsyncClient module when stress testing my Flask SocketIO service. Specifically, I am using I have tried inspecting the code, and it seems that the execution is getting stuck at this line. I'm wondering if I have misused the API, or if the line needs to be wrapped in Any help or suggestions would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The Socket.IO connection has two different phases. The first phase is about establishing the low-level Engine.IO transport. The second phase connects the Socket.IO namespace(s). The wait timeout applies to the second phase. I guess the definition can be extended to apply to the whole connection, but that is not how this is currently designed to work. Unfortunately in an asynchronous application you can't add too much CPU load. I'm not sure how many clients you are starting, but from your description it sounds like maybe you are doing more than what your process can handle reasonably well. |
Beta Was this translation helpful? Give feedback.
The Socket.IO connection has two different phases. The first phase is about establishing the low-level Engine.IO transport. The second phase connects the Socket.IO namespace(s). The wait timeout applies to the second phase. I guess the definition can be extended to apply to the whole connection, but that is not how this is currently designed to work.
Unfortunately in an asynchronous application you can't add too much CPU load. I'm not sure how many clients you are starting, but from your description it sounds like maybe you are doing more than what your process can handle reasonably well.