Reputation: 531
Retrieval of /signalr/hubs gets very slow after 5-10 minutes, I've to restart app pool again and again. Is there any way to cache this?
What I've done-
Checked all the memory and cpu allocations for App pool but couldn't find anything.
Searched on google but didn't find anything relevant
Upvotes: 2
Views: 1614
Reputation: 1213
You can try putting this jquery functions in you View Page.
var tryingToReconnect = false;
$.connection.hub.reconnecting(function() {
tryingToReconnect = true;
});
$.connection.hub.reconnected(function() {
tryingToReconnect = false;
});
$.connection.hub.disconnected(function() {
if(tryingToReconnect) {
notifyUserOfDisconnect(); // Your function to notify user.
}
});
Also check if you network connection is slow.
$.connection.hub.connectionSlow(function() {
notifyUserOfConnectionProblem(); // Your function to notify user.
});
You'll get exact idea about the problem weather issue is because of signalR
or not.
Hope this helps.
Upvotes: 3