SignalR / SignalR

Incredibly simple real-time web for .NET
http://signalr.net
Other
9.21k stars 2.28k forks source link

When scale-out from down to up, refresh browser for client longPolling connection OnDisconnected in server raise several times for a same connection disconnected #1916

Closed Xiaohongt closed 6 years ago

Xiaohongt commented 11 years ago

Use scale-out, on client use longPolling and connection start, when scale-out from down to up, refresh the browser for the client , OnDisconnected in server raise several times for a same connection disconnected

Functional impact: On server OnDisconnected raise several times for same connection disconnected in this case

Repro: 1). use UseSqlServer scale-out, on Sql server machine, start the sql server service 2). e.g. in the asp.net sample ConfigureSignalR, add:

string connectionString = "......";
GlobalHost.DependencyResolver.UseSqlServer(new SqlScaleoutConfiguration(connectionString) );

3). request page, use longPolling, start connection: e.g. request http://localhost:40476/Raw/Default.aspx?transport=longPolling

4). on Sql server machine, stop the sql server service 5). refresh the browser for the page in step3) 6). on Sql server machine, start the sql server service 7). refresh the browser for the page in step3) until the client connection start 8). On the page, we can see that client receives message from server OnDisconnected event several times for a same connection disconnected, (this only happens for one connection, other connections OnDisconnected just raise one time).

Note, I debugged the server OnDisconnected event did raise several times for a same connection disconnected in this case. So far I didn't see this repro with other transport yet.

Expected result: On server OnDisconnected raise just one times for connection disconnected

Actual result: On server OnDisconnected raise several times for a connection disconnected

Here are trace: trace_issue#1916.zip in https://skydrive.live.com/?cid=7230a11e3a3e316b&id=7230A11E3A3E316B%21455

davidfowl commented 11 years ago

Moving to the backlog.

aspnet-hello commented 6 years ago

This issue has been closed as part of issue clean-up as described in https://blogs.msdn.microsoft.com/webdev/2018/09/17/the-future-of-asp-net-signalr/. If you're still encountering this problem, please feel free to re-open and comment to let us know! We're still interested in hearing from you, the backlog just got a little big and we had to do a bulk clean up to get back on top of things. Thanks for your continued feedback!