Search code examples
signalrsignalr-hub

SignalR- Server unable to call specific client method but client able to call server methods


We are using long polling clients and are losing messages sent to specific users using Clients.User(xxx).. This happens when the user is idle for more than 30 mins. The user is able to call server methods but not receive through the above method.

I suspect there is a correlation with the below setting. What is impact of that setting default on a SignalR based asp.net Web API application?

private const int DefaultMaxTopicsWithNoSubscriptions = 1000;

Could someone explain the impact of modifying this and why this is kept at 1000?

In what case would there be topics without subscribers?

Edit-We have around 3000 clients who are always online and keep sending updates to the server. The server sends updates to specific clients based on some conditions.


Solution

  • Just to help out anyone who is seeing this behaviour: There was a bug in the SignalR framework 2.2.2 which was causing the user list to be flushed out in specific scenarios. Talked to the SignalR team and this was fixed in 2.3.0 release.