Wednesday, January 27, 2010

ASPNet SessionDB Problem with LCK_M_U locks and Excessive Calls to TempGetStateItemExclusive3

A recent issue arose for a client where the number of requests to their ASPNet Session State Database would drastically increase during peak load. Another symptom was a significant number of LCK_M_U lock types resulting from calls to TempGetStateItemExclusive3, a stored procedure in the ASPNet database.

Attempts to Google for the issue would almost always lead to articles that addressed the DeleteExpiredSessions stored proc. In this case, however, all indications where that DeleteExpiredSessions was not contibuting to this problem.

It turned out that the large amounts of data being stored in the Session object were getting dragged around on every request as described by Marc Gravell.   A coworker pointed out this MSDN blog entry showing how to examine the contents of the ASPNet rows. 

The symptoms showed up to me as lots of LCK_M_U type locks and excessing TempGetStateItemExclusive3 calls. Perhaps because of the tools I was using, I saw different symptoms than most and therefore found searching online to be of little help.

1 comment:

  1. This is a nice article..
    Its easy to understand ..
    And this article is using to learn something about it..

    c#, dot.net, php tutorial, Ms sql server

    Thanks a lot..!
    ri80

    ReplyDelete