We have two web applications (Azure web roles) that suffer from random long delays (40 to 60 seconds) during System.Web.HttpApplication.BeginRequest. We know this because we use NewRelic to monitor our web applications. A common culprit is problems with thread flexibility due to the ASP.NET session state locking mechanism, however we do not use ASP.NET session state, and on one of the sites we do not use sessions at all.
One application is much more complicated than another, and suffers more delays, but I will use a simple application in this matter to reliably narrow down the root cause.
A simple web application is a series of web services based on ServiceStack. He does not use sessions. It acts only as a broker with a WCF-based service level. It basically directs requests for WCF services, and then displays the response to the views to pass back to the agent. Servers do not even break a sweat on downloads that they run (maximum 2.5% processor).
So what is the probable cause?
- My best guess is that this is a thread flexibility issue, as it seems to be waiting for something that locks can offer somewhere. But what does it expect if not a session state? Does NewRelic or ServiceStack cause blocking?
- NewRelic reports are erroneous and no problem. Well, NewRelic reported the problems correctly when we used the session state of ASP.NET and got a lot more of these delays.
Co7e
source share