Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL Server ASPState Blocking under high load

SQL Server ASPState Blocking under high load

Scheduled Pinned Locked Moved Database
databasemobilesql-servergame-devsysadmin
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MecAlex
    wrote on last edited by
    #1

    We are running SQL 2008 R2 Enterprise server with ASP Persistent sessions and our main data DB on the same 2008 R2 Enterprise server. We're currently experiencing random freezes where all websites and applications accessing the DB become un-responsive. Has anyone same problem and how you solved it. Any suggestion? Thx:confused:

    We live in a Newtonian world of Einsteinian physics ruled by Frankenstein logic

    W 1 Reply Last reply
    0
    • M MecAlex

      We are running SQL 2008 R2 Enterprise server with ASP Persistent sessions and our main data DB on the same 2008 R2 Enterprise server. We're currently experiencing random freezes where all websites and applications accessing the DB become un-responsive. Has anyone same problem and how you solved it. Any suggestion? Thx:confused:

      We live in a Newtonian world of Einsteinian physics ruled by Frankenstein logic

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      The first thing os to start monitoring, what happens in the database. Open Management Studio and check the Activity Monitor. Based on your symptoms search for processes that have a value in "Blocked By" -column. Since this sounds like it could be a locking problem see if the processes are waiting for lock releases. If you find those, you can search for the process having a value in "Head Block" column, this would be the one (or several) process causing the situation. If you find such process, have a look at the details, what is it doing. This helps to find the problem source in the calling code. Also check memory and CPU usage,are they extremely high.

      The need to optimize rises from a bad design.My articles[^]

      M 1 Reply Last reply
      0
      • W Wendelius

        The first thing os to start monitoring, what happens in the database. Open Management Studio and check the Activity Monitor. Based on your symptoms search for processes that have a value in "Blocked By" -column. Since this sounds like it could be a locking problem see if the processes are waiting for lock releases. If you find those, you can search for the process having a value in "Head Block" column, this would be the one (or several) process causing the situation. If you find such process, have a look at the details, what is it doing. This helps to find the problem source in the calling code. Also check memory and CPU usage,are they extremely high.

        The need to optimize rises from a bad design.My articles[^]

        M Offline
        M Offline
        MecAlex
        wrote on last edited by
        #3

        At that particular time yes, CPU 100% (2.27GHz), memory 99% (8GB) and no release. Yes, procedure is identified : UPDATE [ASPState].dbo.ASPStateTempSessions procedure trying to update ASPState table... :mad: and after: life is crashed.

        We live in a Newtonian world of Einsteinian physics ruled by Frankenstein logic

        W 1 Reply Last reply
        0
        • M MecAlex

          At that particular time yes, CPU 100% (2.27GHz), memory 99% (8GB) and no release. Yes, procedure is identified : UPDATE [ASPState].dbo.ASPStateTempSessions procedure trying to update ASPState table... :mad: and after: life is crashed.

          We live in a Newtonian world of Einsteinian physics ruled by Frankenstein logic

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          Ok, several possible reasons for this but I guess you should go through the procedure and optimize the statements, possibly create indexes etc. Also feels like the server could be paging. You could check that with Performance Monitor (Windows) and if the server is paging, reduce maximum amount of memory allocated to SQL Server.

          The need to optimize rises from a bad design.My articles[^]

          M 1 Reply Last reply
          0
          • W Wendelius

            Ok, several possible reasons for this but I guess you should go through the procedure and optimize the statements, possibly create indexes etc. Also feels like the server could be paging. You could check that with Performance Monitor (Windows) and if the server is paging, reduce maximum amount of memory allocated to SQL Server.

            The need to optimize rises from a bad design.My articles[^]

            M Offline
            M Offline
            MecAlex
            wrote on last edited by
            #5

            Yes, I've already done it. In my case Expired sessions were not cleaned. When I release Memory with T-SQL, I allocated these jobs to my Agent, and memory release comes after 30-40 min, (I run job every 30 min) I understand that the problem is session. I am going to try CURSOR-BASED ROUTINE. Hope it will prevent my Server from troubles what cause us all week. If there any suggestions, I would be glad to hear them. P.S.: Found solution. I replaces ASPState expiry session procedure with Alternative CURSOR-BASED ROUTINE. Performance came back to normal state. No crashes also.

            We live in a Newtonian world of Einsteinian physics ruled by Frankenstein logic

            modified on Friday, April 15, 2011 6:25 AM

            W 1 Reply Last reply
            0
            • M MecAlex

              Yes, I've already done it. In my case Expired sessions were not cleaned. When I release Memory with T-SQL, I allocated these jobs to my Agent, and memory release comes after 30-40 min, (I run job every 30 min) I understand that the problem is session. I am going to try CURSOR-BASED ROUTINE. Hope it will prevent my Server from troubles what cause us all week. If there any suggestions, I would be glad to hear them. P.S.: Found solution. I replaces ASPState expiry session procedure with Alternative CURSOR-BASED ROUTINE. Performance came back to normal state. No crashes also.

              We live in a Newtonian world of Einsteinian physics ruled by Frankenstein logic

              modified on Friday, April 15, 2011 6:25 AM

              W Offline
              W Offline
              Wendelius
              wrote on last edited by
              #6

              Glad to hear you got it resolved!

              The need to optimize rises from a bad design.My articles[^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups