Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

With ServiceBus scale-out, when call UseServiceBus at app_start return error like time out for connection, then all clients signalr/hubs request will return that error #2524

Closed
halter73 opened this Issue · 4 comments

3 participants

@halter73
Collaborator

With ServiceBus scale-out valid connectionString and active ServiceBus Topic, when call UseServiceBus at app_start, if it returns error like time out on init connection to ServiceBus, then on all clients the requests signalr/hubs or requests signalr/negotiate to that server will get that error e.g. below, in this case SignalR can’t never work on that server if AppDomain /process not restart.

Since connection is valid and ServiceBus Topic is active, so SignalR should not always return error/ never work in this case.

Note:
This only repro on ServiceBus scale-out.

(With SqlServer and Redis, the requests signalr/hubs and requests signalr/negotiate don’t get any error for connection to scale-out, new client still can connect to scale-out in this case)

Error on all clients requests signalr/hubs or requests signalr/negotiate to the server when time out on init connection to ServiceBus from call UseServiceBus at app_start:

[WebException: The request was aborted: The request was canceled.]
   System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) +8606787
   Microsoft.ServiceBus.Messaging.CreateOrUpdateAsyncResult`1.<GetAsyncSteps>b__d(CreateOrUpdateAsyncResult`1 thisPtr, IAsyncResult r) +35
   Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result) +358

[TimeoutException: The request has timed out after 60000 milliseconds. The successful completion of the request cannot be determined. Additional queries should be made to determine whether or not the operation has succeeded.]
   Microsoft.ServiceBus.Common.AsyncResult.End(IAsyncResult result) +576
   Microsoft.ServiceBus.NamespaceManager.CreateSubscription(SubscriptionDescription description) +250
   Microsoft.AspNet.SignalR.ServiceBus.ServiceBusConnection.Subscribe(IList`1 topicNames, Action`2 handler, Action`2 errorHandler) +967
   Microsoft.AspNet.SignalR.ServiceBus.ServiceBusMessageBus..ctor(IDependencyResolver resolver, ServiceBusScaleoutConfiguration configuration) +562
   Microsoft.AspNet.SignalR.<>c__DisplayClass2.<UseServiceBus>b__0() +44
   System.Lazy`1.CreateValue() +455
   Microsoft.AspNet.SignalR.<>c__DisplayClass2.<UseServiceBus>b__1() +139
   Microsoft.AspNet.SignalR.DefaultDependencyResolver.Track(Func`1 creator) +39
   Microsoft.AspNet.SignalR.DefaultDependencyResolver.GetService(Type serviceType) +231
   Microsoft.AspNet.SignalR.DependencyResolverExtensions.Resolve(IDependencyResolver resolver) +64
   Microsoft.AspNet.SignalR.PersistentConnection.Initialize(IDependencyResolver resolver, HostContext context) +57
   Microsoft.AspNet.SignalR.Owin.CallHandler.Invoke(IDictionary`2 environment) +839
   Microsoft.AspNet.SignalR.Owin.Handlers.HubDispatcherHandler.Invoke(IDictionary`2 environment) +333
   Microsoft.Owin.Host.SystemWeb.OwinCallContext.Execute() +180
   Microsoft.Owin.Host.SystemWeb.OwinHttpHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object extraData) +414
   Microsoft.Owin.Host.SystemWeb.CallContextAsyncResult.End(IAsyncResult result) +180
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

#2091

@abnanda1

@Xiaohongt we need the repro steps for this soon.

@abnanda1

@Xiaohongt can you please repro this to see if this issue is still there?

@Xiaohongt
Collaborator

I verified that other error is handled in retry, and read the source code that this error should also be handled in retry.

Since we can't control SB throw TimeoutException, so it is very difficult to repro this, probably we can add unit test for it

@abnanda1 abnanda1 was assigned
@abnanda1

We can't really add a unit test for this so I am closing this for now. We can reopen it if it comes up again.

@abnanda1 abnanda1 closed this
@abnanda1 abnanda1 was unassigned by halter73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.