46 — LockBusy

concurrencyperformance

A lock could not be acquired because it is already held

What is happening?

LockBusy is returned when an operation attempts to acquire a lock that is currently held by another operation in an incompatible mode. Unlike LockTimeout (24), which waits and eventually gives up, LockBusy indicates the lock request was rejected immediately. This is common with DDL operations that use non-yielding locks.

Common causes

  1. Concurrent DDL operations (drop, rename, createIndex) on the same namespace
  2. Background index build holding a lock while another administrative command runs
  3. Collection validation running while a write-heavy workload holds locks
  4. Compact or repairDatabase running on a collection that has active operations

Diagnostic Steps