dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
dbaguide.com
Home/Error Library/sqlserver-1222-lock-request-timeout
SQL Server
MSSQL 2017 - 2022Lock & Deadlock
6 min read
Error 1222: Lock request time out period exceeded.

SQL Server Error 1222: Lock Request Timeout — Who Holds the Lock?

Distinction between Error 1222, 1205 deadlock, and client timeouts, identifying the head blocker session, and RCSI implementation.

Reviewed by:Senior Database Architect & SRE (dataiotech Labs)
Tested Versions: SQL Server 2017 / 2019 / 2022
First 60 Seconds Emergency Protocol:

The error string is a symptom, not the root cause. Do not restart the server blindly. Run the diagnostic queries below to pinpoint the actual failure mode.

▸Symptoms

plaintext
Error 1222: Lock request time out period exceeded.

▸Triage Sequence

  1. 1Find Head Blocker:
sql
SELECT r.session_id, r.blocking_session_id, r.wait_time/1000 AS wait_sec, t.text FROM sys.dm_exec_requests r OUTER APPLY sys.dm_exec_sql_text(r.sql_handle) t WHERE r.blocking_session_id <> 0;
  1. 1Inspect Sleeping Transactions:

A session with status = 'sleeping' and open_transaction_count > 0 indicates an uncommitted transaction leak.

  1. 1Enable Read Committed Snapshot Isolation (RCSI):
sql
ALTER DATABASE app_db SET READ_COMMITTED_SNAPSHOT ON;

Eliminates reader/writer blocking without the dirty reads caused by WITH (NOLOCK).

Other Database Error Triage Playbooks

Other battle-tested diagnostic guides for high-severity database errors.

All Errors (20)