Expect the UnExpected
I am back blogging buddies in a very short period with yet another expect the unexpected series worth one sleepless night. This time the culprit is me. The application team started reporting that the CPU is hitting 100%.
When I looked into the SQL Server the application was opening up the connections and it was not closing up and it was keep consuming the CPU. We just got that one of the stored procedure was the culprit.But it was doing nothing other than selecting and inserting some rows in a table which you would never doubt believe me. I was unable to run the profiler as it was getting hung due to 100% CPU and the existing connections show nothing in the profiler.
So just in case I updated the stats and it didnt help me in any ways. And we started digging digging diggingggggg nothing helped. We started beating around the bush like checking the dll if its closing the connections properly, checking for MSMQ bugs etc etc..Listening to nonsenses like RDBMS should start terminating idle connections after some time this that.. blah blah..
Atlast one of the developer say hare yaar check the number of rows in that table. I ran just count * and it kept running for hours. Amused by that I tried to kill the connection aww it started rolling back with message 0% completed 0 mins remaining :(. I was shocked to see a select query rolling back.
Amused with that I thought there will be some consistency issue in the table level alas I was right (atleast this time) there were consistency issue crap. The issue basically was the select query from the application keep running running running for days due to this bizzare reason and no errors nothing. I was amused that even the update stats went fine awww..
In fact now a days Im enjoying this expect the unepxected things :)..It was a good learning worth of one nights sleep :) happy administrating.
With Smiles
Santhosh
0 Secrets:
Post a Comment