带有Redis背板的SignalalR在Azure服务结构中运行。
几天前,它已部署到开发人员机器以进行质量检查,看上去已经两天了,突然之间,我发现许多作业在日志中显示以下消息:
System.TimeoutException: Transport timed out trying to connect
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在尝试连接Signalr Hub时抛出此错误。 该代码进行了多次尝试以解决分区问题,例如以下代码:
while (!maxTrial)
{
try
{
partition = await AddressResolver.ResolvePartition(SignalRUrl, null).ConfigureAwait(false);
signalRAddress = AddressResolver.GetServiceAddressUri(partition);
// Verify SignalR address.
using (var testConnection = new HubConnection(signalRAddress))
{
await testConnection.Start().ConfigureAwait(false);
}
....
}
catch (Exception ex)
{
TraceError(ex);
}
}