I have a problem with one async handler in distributed ASP.NET web app. First let me explain a use case:
- application uses IIS 8 on win 2012 machine with .NET Framework 4.5.2
application has disabled Session and authentication modules via web.config like this
<system.webServer> .... <modules> <remove name="WindowsAuthentication" /> <remove name="Session" /> <remove name="FormsAuthentication" /> </modules> </system.webServer>
application uses custom async web handler to serve the specific request
- application has very heavy traffic (about 50k requests per minute per server, async handler has about 10k requests per minute per server all tracked from NewRelic)
- application is distributed via multiple w3wp processes (2 w3wp processes) and multiple virtual servers (about 10 servers)
- application has high amount of connections
All normal (sync requests) are working fine but async request that does a little more work (that's why we use async request) is often slow but NewRelic reports that it is slow because of "AcquireRequestState". Now I've looked on google and stack overflow and this event is connected to creating a Session but we have sessions disabled in web.config. Does anyone know what else could "AcquireRequestState" could be doing? Are we missing some place to remove session state? Adding that from web.config to machine.config did nothing...
Here is a snippet from a request in NewRelic:
**Slowest components Count Duration % **
AcquireRequestState 1 12,600 ms 100% --> WTF?
ExecuteRequestHandler 1 5.01 ms 0%
Integrated Pipeline 1 0.334 ms 0%
UpdateRequestCache 1 0.3 ms 0%
EndRequest 1 0.168 ms 0%
AuthenticateRequest 1 0.161 ms 0%
Total time 12,600 ms 100%
EDIT:
I have <sessionState mode="Off" />
in web.config (<system.web>
section) so that is not it.
<sessionState mode="Off">
insystem.web
Hth... – Duplication<modules runAllManagedModulesForAllRequests="true">
– RevolutionaryAcquireRequestState
is actually calling. Its just an eventhandler. Once you know what its actually calling, you can find out what that is and where its signing up for the event and, hopefully, how to stop it. – Cribbage