6

This started happening in the last few days; possibly since I installed Visual Studio 2012. It's currently only happening on my machine (my colleagues are all still on VS 2010), but I'm hoping to uninstall VS 2012 to see if that has an affect.

Around 50% of all my web requests hang in SessionStateModule/REQUEST_AQUIRE_STATE for around 100 seconds (then the page completes successfully).

ANTS Profiler reports all the time as "Awaiting synchronisation" and gives a stack trace in some IIS thread callback (none of our code; sadly I don't have the info to hand).

I enabled IIS Failed Request Tracing for all requests, and reloaded the same page of our app 10 times. Requests 3, 5, 7, 9 all took > 100 seconds, with the others taking < 5 seconds.

We're using In Process sessions, so nothing is going over the network or being serialised. As far as I can tell, none of our code has been run up until the point this happens.

How can I get more information on what's happening to debug the issue?

IIS Failed Request Trace screenshot

Possibly related:

Browser waits for ajax call to complete even after abort has been called (jQuery)

Community
  • 1
  • 1
Danny Tuppeny
  • 40,147
  • 24
  • 151
  • 275

2 Answers2

2

This is a bug in .NET 4.5; see "Issue 6" on this page:

http://support.microsoft.com/kb/2828841/en-us

Danny Tuppeny
  • 40,147
  • 24
  • 151
  • 275
  • 1
    I am having the same problem and I don't have .NET 4.5 installed on the server. It is possible that this is not necessarily related to the .NET version. – Dorin Jul 02 '12 at 10:40
  • 1
    Very possible; we had very strange issues with our app logging users out on every 3rd request, which we believe to be the same issue; but we're not entirely sure why it behaves slightly differently. Possibly it's very dependant on timing! – Danny Tuppeny Jul 02 '12 at 12:42
  • 2
    Although we worked around this, we still think this may be a bug in ASP.NET/IIS. We're seeing it in another place now. When a request is aborted by the browser navigating away, the original request hangs for 120 seconds (max script timeout) and all other requests from that user/session stall behind it :( – Danny Tuppeny Feb 15 '13 at 09:17
0

It sounds like there might be a bug in RC .NET 4.5. First I would try uninstalling. Otherwise for troubleshooting purposes, you could create your own session state module handler using the following article, perhaps you'll be able to see what's tripping the session module up in your application.

http://msdn.microsoft.com/en-us/library/system.web.sessionstate.sessionstateutility.aspx#Y969

Joe Web
  • 128
  • 1
  • 1
  • 7