Open Iguanadad opened 4 years ago
@Iguanadad, thanks for the report. This should not happen as the SDK code is designed to automatically reconnect to the service. If you'd like us to take a look at the backend please send your ResourceID (it looks like /subscriptions/ xx /resourceGroups/ yy /providers/Microsoft.SignalRService/SignalR/ zz) to [my github alias]@microsoft.com
What is the SDK version used? - noted that you are using the latest 1.5.1.
Could you help to check the memory and CPU usage of the app server? Are they abnormal before you restart the app server? "Connectio ping timeout" usually happens when the app server is too busy to handle the ping messages from the Azure SignalR Service and the service closes the connection.
CPU and memory usage are not at all abnormal and not close to the limits of the service plan. Also, the app server is very responsive to incoming requests from another app service so it doesn't appear to be a loading issue.
I would be happy to implement something to detect the offline state and reconnect to the service but I can't find any way to do those two things from our code (as @KKhurin mentioned, the SDK is supposed to handle the reconnection automatically)
Yes it should always reconnect. Could you share with @KKhurin and me lianwei(at)microsoft.com
the log files(with timestamp, or with cid
provided so we can narrow down through logs) when the incident happens? Also, when the issue takes place again, could you help to take a dump file for us?
With a second look, it should be the same issue https://github.com/Azure/azure-signalr/pull/763/files tries to fix however seems still can happen in some circumstances that for the server connection, the transport layer is stopped, however, the server connection is not restarted/ or restarted as an on-demand connection. BroadcastMessages
only goes through fixed connections. Still need more info to find the root cause.
Should be fixed in the latest release 1.6.0, please try
Latest release deployed without an issue - many thanks
We have a project using azure-signalr which is working fine for about 3 days and then, although the server API hosting the hub is still online, no signals are broadcast from it to any of the clients.
Restarting the SignalR service in Azure does nothing, and the only way to re-establish the connections is to restart the hub server.
We are calling... GlobalHost.ConnectionManager.GetHubContext()
...to get the IHubContext each time we attempt to broadcast (because when we tried keeping a static copy of the IHubContext we failed to get any messages broadcast at all) so we cannot see any way we could be getting an out of date context.
Any suggestions on how we can keep the service running for more than 3 days would be appreciated.
After turning on the detailed logging we have the following after one such failure (redacted the service_name and service_cid):
The last error message is then repeated several hundred times.