Open Bug 1781065 Opened 8 months ago Updated 5 months ago

SignalR connection slowdown multiple tabs


(Core :: Networking: WebSockets, defect)

Firefox 102




(Reporter: jan.seris, Unassigned, NeedInfo)



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:

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.

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.

Component: Untriaged → Tabbed Browser

The severity field is not set for this bug.
:dao, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dao+bmo)

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.

Component: Tabbed Browser → Networking: WebSockets
Product: Firefox → Core

Per discussion in this appears to be "by-design"; we're progressively delaying WebSocket connections if the old connections were abnormally ended.

Ever confirmed: true
Flags: needinfo?(dao+bmo)
Regressed by: 711793
See Also: → 1662694
Flags: needinfo?(jan.seris)

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 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.

Flags: needinfo?(jan.seris)

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".

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:

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!

Flags: needinfo?(jan.seris)
Keywords: regression
No longer regressed by: 711793
See Also: → 782704, 711793
You need to log in before you can comment on or make changes to this bug.