SignalR connection slowdown multiple tabs
Categories
(Core :: Networking: WebSockets, defect)
Tracking
()
People
(Reporter: jan.seris, Unassigned, NeedInfo)
References
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
Hi there is a bug with SignalR multiple connnections slowing down the more connections the more slowdown.
Please see the following issue and the last comment here:
https://github.com/dotnet/aspnetcore/issues/40453
https://github.com/dotnet/aspnetcore/issues/40453#issuecomment-1194063911
Steve Sanderson is the lead developer of Microsoft SignalR and Blazor team which is a SPA web framework using WebSocket to refresh UI.
Actual results:
Multiple WebSocket connnections slowing down the more connections the more slowdown.
Expected results:
Opening multiple tabs (WebSocket connections) should not heavily increase time needed to establish the connection.
Comment 1•8 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•8 months ago
|
||
The severity field is not set for this bug.
:dao, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 3•7 months ago
|
||
Setting the component and waiting for the developer's opinion about it.
If this is not the correct component, please feel free to change it to a more appropriate one. Thanks.
Comment 4•5 months ago
|
||
Per discussion in https://github.com/dotnet/aspnetcore/issues/40453#issuecomment-1194063911 this appears to be "by-design"; we're progressively delaying WebSocket connections if the old connections were abnormally ended.
https://bugzilla.mozilla.org/show_bug.cgi?id=711793
Updated•5 months ago
|
Updated•5 months ago
|
Hi Randell and Valentin.
You say you are progressively delaying WebSocket connections if the old connections were abnormally ended.
This is not the case with the issue I am describing and also in the gif here https://github.com/dotnet/aspnetcore/issues/40453#issuecomment-1194063911 you can see that only new WebSocket connections are added (everytime in a new tab). When approx 5+ are open, it keeps getting very slow. The WebSocket connections are not terminated or abnormally terminated at this moment when only new tabs are added.
I also believe that the Blazor framework is freeing the resources associated with the WebSocket connection when a tab is closed (or the browser is closed) because a handler can be placed in the application when a SignalR connection is "ending".
Comment 8•5 months ago
|
||
So, this sounds a lot like Bug 782704 - Multiple initiated Websocket connections have an increased delay. The cause of that seems to have been a server that doesn't handle connections asynchronously.
I can't say if that's the problem here, but I tried to reproduce it locally with this code and wasn't able to get the long delays:
https://www.piesocket.com/blog/python-websocket
Jan, could you try to see if you can get it to happen with the same code?
Otherwise, could you provide us with a public server to test this on? Thanks!
Description
•