Open stephenlautier opened 5 years ago
this is what I am struggling with now,
this happens when you shutdown any client ungracefully so it doesn't invoke OnDisconnect()
even Send/Invoke OneWay doesn't help to prevent this error, causes timeouts for us
@luckyycode which orleans version are you using?
If you want to give it a try we have a fork of this with several fixes (which are still not downmerged here) https://github.com/sketch7/SignalR.Orleans
https://github.com/sketch7/SignalR.Orleans/blob/1.x/CHANGELOG.md
If you do i suggest using 1.0.0-rc6
not the 2.x
(but 1.x is for netcore 2 whilst 2.x is netcore3 however not updated with latest fixes). We are now using atm the 1.0.0-rc5 on production and its much more stable
Also fyi one of the reasons why its also causing errors/timeouts seems to be caused due to this https://github.com/dotnet/orleans/issues/6161 (but there were other fixes in our fork which should help/fix)
Issue
If for some reason during disconnection theres a failure to handle
ClientGrain.OnDisconnect
it keeps throwing errors.Scenario
client.OnDisconnect
disconnection fails_hubContext.User("").Send("Echo");
We end up with something as following: (and a lot moreeee logs)
Suggestion
ClientGrain.Send
fails to send x amount e.g. 5 (or configurable)OnDisconnect
This way we will properly clean up
ConnectionGrain
's (user/group) from stale connectionsAs a side note, disconnection is still failing due to the extension not installed issue https://github.com/OrleansContrib/SignalR.Orleans/issues/89 :(
update: the specified scenario is not 100% as i thought, as i tried to reproduce locally by throwing on purpose in several areas but I never ended without serverId in that exact state