5

On a production SQL Server 2012 database we are getting some odd locking statistics that I don't understand.

  • Lock Waits/Min: 0.2
  • Lock Timeouts/Min: 197.4
  • Deadlocks/Min: 0.0

@@lock_timeout is set to -1

How can I have Lock Timeouts without having Lock Waits? I recently added some missing indexes, could that be affecting these numbers?

JustinDoesWork
  • 478
  • 1
  • 5
  • 14

1 Answers1

5

It seems you are monitoring a Lock Timeouts/sec Performance Monitor counter or perhaps querying sys.dm_os_performance_counters directly. The Lock Timeouts/sec class for Profiler has the following notes in the documentation:

Lock Timeouts/sec

Most likely the vast majority of the events you are seeing are explained that way. Try monitoring Lock:Timeout (timeout > 0) instead.

Paul White
  • 83,961
  • 28
  • 402
  • 634