Hey there, we are running into an odd situation where CPU in a long running “always on” web app creeps up to almost 100%. We have profiled this remotely and locally and the hot spot is the ServerEventsClient.Restart method e.g.
The always on web app is a client of another web service that is also running servicestack web services. The odd thing is that we have this web app deployed on 3 separate identical Azure web apps and only one of the web apps experiences this issue. I have also recreated it locally per screenshot above.
The web app “client” is running service stack 5.8.0 (.NET Framework) and the server is running 5.6.1 (.NET core)
The server is running with a heartbeat interval of 5 seconds and an idletimeout of 30 seconds.
The exception which we get before the restart always has a format of "Message = “Last Heartbeat Pulse was 30111.47ms ago” (time varies of course)
The weird thing is that all web app clients are connecting to the exact same azure server instance however, only clients on this one particular server (which uses its own database) get these heartbeat errors (and I can also get them locally if I connect using the same settings). Same code base etc.
I am really at a loss - my solution is going to be to just Stop the events client if this error comes up but I would really like to know why it’s happening.