January 10, 2019 at 2:24 pm
Hi,
In the past week, we had to reboot sql server to make it come out of the locked state. Sql error log only shows regular job running.
Application log does not give any clear indication. Is possible can you help and advise how to properly troubleshoot this issue.
Sp who2 or any script which can be run to find the root cause. I know there can be many reasons but trying to narrow the problem.
Thank you!
January 10, 2019 at 3:06 pm
Here's my first suggestion:
grab a copy of Adam Mechanic's sp_whoisactive and put it in the master database:
http://whoisactive.com/downloads/
running a command like this manually will give you some results of what is running, and potentially blocking other processes.
pay attention to things running for a long time, that is blocking other processes or is using lots of CPU or memory.
the results are very rich and go a long way to pointing out what to look at.
EXECUTE sp_whoisactive
EXECUTE sp_whoisactive @get_full_inner_text = 1,@get_outer_command = 1,@get_plans=1,@show_sleeping_spids=0
Lowell
January 11, 2019 at 6:28 am
You can look to the Extended Events system_health session for some information. There is an event on long running queries that will be in there and might supply you with information to troubleshoot this situation after the fact. Look for the wait_info event.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 11, 2019 at 1:51 pm
sizal0234 - Thursday, January 10, 2019 2:24 PMHi,In the past week, we had to reboot sql server to make it come out of the locked state. Sql error log only shows regular job running.
Application log does not give any clear indication. Is possible can you help and advise how to properly troubleshoot this issue.
Sp who2 or any script which can be run to find the root cause. I know there can be many reasons but trying to narrow the problem.Thank you!
Been through this. During the apparent "locked state", have SSMS already open so that you are actually "in" the server because you won't be able to establish a new connection during the "locked state". Run SP_WHO2 and look for connections that are in a "Killed/Rollback" state. Count the number of spids in such a state. If there are any in such a condition, post back and I'll tell you what the next step is.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 11, 2019 at 2:05 pm
I appreciate everyone's help as always. I ran couple of performance reports and found memory pressure. After a little bit of digging the culprit was the OS memory. It is like running fast ferrari( optimized sql server) on slow and bumpy road. OS memory needs to be added and also change in page file. But, it has been a great amount of learning and thank you everyone for the post. Now, after upgrading the OS memory and couple of other changes, then it will be again a testing phase to ensure we did not miss the culprit. Thank you all and have a great weekend!
January 11, 2019 at 2:48 pm
sizal0234 - Friday, January 11, 2019 2:05 PMI appreciate everyone's help as always. I ran couple of performance reports and found memory pressure. After a little bit of digging the culprit was the OS memory. It is like running fast ferrari( optimized sql server) on slow and bumpy road. OS memory needs to be added and also change in page file. But, it has been a great amount of learning and thank you everyone for the post. Now, after upgrading the OS memory and couple of other changes, then it will be again a testing phase to ensure we did not miss the culprit. Thank you all and have a great weekend!
Like I said... been through this. We (I say "we" but I recommended that it wouldn't actually work even though it did look like simple memory pressure, which turned out to be a symptom of the real cause) added 128GB to our server and dedicated half of that plus what we previously had (28GB) to the operating system. It didn't help at all for the problem we were having whose symptoms were the "Killed/Rollback" thing I previously spoke of and that you should still look for if it happens to you again. We also jumped from 36 to 48 logical CPUs (24 core and, again, no my idea but had to let them prove it to themselves) and all it did was make things far worse because the extra CPUs allowed for many more processes that ended up in a Killed/Rollback state.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply