-
Notifications
You must be signed in to change notification settings - Fork 10.3k
SignalR - Chrome/Edge new Freeze Tabs is dropping client connections #33970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Dupe of #31079 This is already fixed in the latest patches for the Javascript client. |
Actually, taking over this issue for the |
Thanks for contacting us. We're moving this issue to the |
We aren't adding anything to the library to workaround the Tab Freezing feature in browsers for now. Instead we log in the browser when we detect that a tab is frozen and point to a doc that explains what is going on and a potential solution application developers can do to workaround the issue if it's important for them. See #34008 for the client change and https://github.com/dotnet/AspNetCore.Docs/pull/22773/files for the docs (docs will be live on docs.asp.net soon) |
Is your feature request related to a problem? Please describe.
I've created a SignalR application and it's been working well for a while now, but as the newest versions of chrome have been rolling out I've noticed that when I'm not actively using the web app, the app loses connection to the SignalR server because it's taking too long to handshake. I've done some digging into this and I believe this is due to the javascript throttling that occurs in a tab/window running in the background and/or being frozen with the new grouped tab freezing logic.
Describe the solution you'd like
Would like to see at minimum some doc around this at the links below in the SignalR area so developers are aware of it, and a suggested withAutomaticReconnect and ServerTimeout settings to alleviate the issue if possible (I'll be messing with this myself to see if I can get something that doesn't end up dropping the connection via the various properties).
https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.signalr.client.hubconnection.servertimeout?view=aspnetcore-5.0
https://docs.microsoft.com/en-us/aspnet/core/signalr/javascript-client?view=aspnetcore-5.0
Ideally SignalR should "just handle it" but I'm not sure of a programmatic workaround at the moment for this.
Additional context
Chrome Release notes on these two features:
https://chromeenterprise.google/policies/?policy=IntensiveWakeUpThrottlingEnabled
From chrome 91 release notes:
While not currently an issue with firefox or edge, if this is the beginning of some sort of new energy-smart paradigm in browser behavior it could have much wider reaching implications for SignalR and polling across the web in general. Might be worthwhile to get in front of it.
The text was updated successfully, but these errors were encountered: