I have an ASP .Net Core server app with SignalR. There is also a client app also written with .Net Core and SignalR. The client connects to the server and they work together.
While working in a local development environment everything works as expected but when I deploy my Server app to the Azure App Service I noticed weird behaviour.
When the client disconnects from the server, the event that the client disconnected comes with a huge lag of ~30 seconds. While other calls between the client and the server work normally, we observe the lag only with client disconnection event.
While investigating this issue I came up with solution to reduce the KeepAliveInterval in server settings;
.AddSignalR(configure =>
{
configure.EnableDetailedErrors = true;
configure.MaximumReceiveMessageSize = null;
configure.KeepAliveInterval = TimeSpan.FromSeconds(1);
configure.EnableDetailedErrors = true;
});
And then the client disconnection event is immediate.
Can someone explain why this issue occurs on Release version on Azure?
The issue did not happen in the local Development environment.
The issue did not happen in the local Release environment.
