Last post Jul 23, 2015 04:08 PM by panchuparayil
Jul 22, 2015 06:37 PM|panchuparayil|LINK
We are using SignalR version 2.2.0
JQuery 2.1.4 (also tried with 1.9.1)
I have a simple chat application, using MongoDB as the backplane (https://github.com/nasavietnam/Signalr.MongoDb) due to a load balancer in the equation. Everything seems to work fine except intermittently when a user sends frequent messages almost all connected
browsers seems to hang for a short period of time. I turned on the debugger on the browser and noticed "Triggering client hub event" repeating as if it got stuck in some loop. I added some tracing in the hub, backplane etc. and noticed no duplicates or repeating
whatsoever. It just appears to be on the client side and all browsers in Mac/Windows. It recovers after a minute or so, no disconnects or reconnects during that time. I am not using any Groups.
Anyone has any similar issues or am I missing anything?
Jul 23, 2015 04:08 PM|panchuparayil|LINK
This is resolved. This was due to duplicate "id" being passed in to OnReceived (ScaleoutMessageBus) event. We had messages coming within milliseconds of each other, changed the id generation logic to accomodate that and it was all good. We had changed the
original logic from the "Signalr.MongoDb" codebase to not do an update which introducted a bug.
Hopefully this helps someone - make sure that "id" is always unique.
OnReceived(int streamIndex, ulong id, ScaleoutMessage message)
I wish the microsoft documentaion was useful - https://msdn.microsoft.com/en-us/library/dn236033(v=vs.118).aspx (no mention of any unique ids)
I found a thread of stacktrace that talked about this - http://stackoverflow.com/questions/26094491/signalr-backplane-based-on-scaleoutmessagebus-needs-an-incrementing-identifier