Requests hanging on Session module on IIS 7.5

后端 未结 4 1994
故里飘歌
故里飘歌 2020-12-10 02:11

From time to time, some requests on my website starts to hang on the RequestAcquireState state of the Session module. When that spiral begins all requests timeout and we nee

4条回答
  •  醉梦人生
    2020-12-10 02:17

    Is it possible those users have another long running request and the requests you see piling up are actually secondary requests? By default, ASP.NET will lock Session until a request is complete. If a second request comes in before the first one is complete, it will have to wait. If you are using MVC, you can change this behavior by adding an attribute to your controller.

    [SessionState(SessionStateBehavior.ReadOnly)]

    This makes Session read-only, removing the locking behavior allowing subsequent requests to be processed.

提交回复
热议问题