Hi there,
My database (V9.5) hit a locking problem that I cannot figure out how it happened.
From the snapshot, my database had a chain of locks like this:
Locks being waited on :
AppHandl [nod-index] TranHdl Lockname Type Mode Conv Sts CoorEDU
24150 [000-24150] 39 000300870000000505F4000352 Row .NS G 4414
24554 [000-24554] 99 000300870000000505F4000352 Row ..U ..X C 4289
25034 [000-25034] 97 000300870000000505F4000352 Row .NS W 7272
24677 [000-24677] 89 000300870000000505F4000352 Row .NS W 4689
25152 [000-25152] 82 000300870000000505F4000352 Row .NS W 7776
25225 [000-25225] 12 000300870000000505F4000352 Row .NS W 8795
24789 [000-24789] 78 000300870000000505F4000352 Row .NS W 4711
25264 [000-25264] 118 000300870000000505F4000352 Row .NS W 7269
25285 [000-25285] 41 000300870000000505F4000352 Row .NS W 4700
24500 [000-24500] 69 000300870000000505F4000352 Row .NS W 4550
25505 [000-25505] 59 000300870000000505F4000352 Row .NS W 7777
25479 [000-25479] 11 000300870000000505F4000352 Row .NS W 63
29467 [000-29467] 211 000300870000000505F4000352 Row .NS W 8914
29361 [000-29361] 178 000300870000000505F4000352 Row .NS W 4325
30202 [000-30202] 263 000300870000000505F4000352 Row .NS W 9044
30196 [000-30196] 255 000300870000000505F4000352 Row .NS W 9035
30088 [000-30088] 207 000300870000000505F4000352 Row .NS W 8879
30379 [000-30379] 243 000300870000000505F4000352 Row .NS W 9074
30373 [000-30373] 276 000300870000000505F4000352 Row .NS W 9057
29980 [000-29980] 249 000300870000000505F4000352 Row .NS W 8950
30457 [000-30457] 330 000300870000000505F4000352 Row .NS W 9118
30251 [000-30251] 430 000300870000000505F4000352 Row .NS W 9230
19422 [000-19422] 392 000300870000000505F4000352 Row .NS W 9181
One NS lock held for a long time and blocked an updated statement and that update statement blocked other select statements. The first granted NS lock did not release.
The isolation level is CS while the lock timeout is -1.
However, I have checked the application handle (24150), the UOW status is WAITING.
Cannot figure out what was happening on that NS lock.
What kind of concurrent situation(s) will end up such unreleased NS lock?
Thanks in advance.
My database (V9.5) hit a locking problem that I cannot figure out how it happened.
From the snapshot, my database had a chain of locks like this:
Locks being waited on :
AppHandl [nod-index] TranHdl Lockname Type Mode Conv Sts CoorEDU
24150 [000-24150] 39 000300870000000505F4000352 Row .NS G 4414
24554 [000-24554] 99 000300870000000505F4000352 Row ..U ..X C 4289
25034 [000-25034] 97 000300870000000505F4000352 Row .NS W 7272
24677 [000-24677] 89 000300870000000505F4000352 Row .NS W 4689
25152 [000-25152] 82 000300870000000505F4000352 Row .NS W 7776
25225 [000-25225] 12 000300870000000505F4000352 Row .NS W 8795
24789 [000-24789] 78 000300870000000505F4000352 Row .NS W 4711
25264 [000-25264] 118 000300870000000505F4000352 Row .NS W 7269
25285 [000-25285] 41 000300870000000505F4000352 Row .NS W 4700
24500 [000-24500] 69 000300870000000505F4000352 Row .NS W 4550
25505 [000-25505] 59 000300870000000505F4000352 Row .NS W 7777
25479 [000-25479] 11 000300870000000505F4000352 Row .NS W 63
29467 [000-29467] 211 000300870000000505F4000352 Row .NS W 8914
29361 [000-29361] 178 000300870000000505F4000352 Row .NS W 4325
30202 [000-30202] 263 000300870000000505F4000352 Row .NS W 9044
30196 [000-30196] 255 000300870000000505F4000352 Row .NS W 9035
30088 [000-30088] 207 000300870000000505F4000352 Row .NS W 8879
30379 [000-30379] 243 000300870000000505F4000352 Row .NS W 9074
30373 [000-30373] 276 000300870000000505F4000352 Row .NS W 9057
29980 [000-29980] 249 000300870000000505F4000352 Row .NS W 8950
30457 [000-30457] 330 000300870000000505F4000352 Row .NS W 9118
30251 [000-30251] 430 000300870000000505F4000352 Row .NS W 9230
19422 [000-19422] 392 000300870000000505F4000352 Row .NS W 9181
One NS lock held for a long time and blocked an updated statement and that update statement blocked other select statements. The first granted NS lock did not release.
The isolation level is CS while the lock timeout is -1.
However, I have checked the application handle (24150), the UOW status is WAITING.
Cannot figure out what was happening on that NS lock.
What kind of concurrent situation(s) will end up such unreleased NS lock?
Thanks in advance.