DBAtlas · Database operations atlas

46: LockBusy

MongoDB

What does it mean?

The requested lock or resource could not be acquired immediately because it was held by another operation, and the operation was rejected instead of waiting. Lock waits that end in a timeout are a separate code (24 LockTimeout).

Why does it happen?

Concurrent administrative/DDL operations on the same collection or database (e.g. two index builds at once, collMod, drop or rename), a conflict with an in-progress maintenance operation, or an internal operation that cannot wait even briefly for a lock hitting a busy resource.

How to fix it

Find the conflicting operation: use db.currentOp() to inspect DDL or maintenance operations running on the same namespace. Retry the command after the conflicting operation finishes. Serialize administrative/DDL operations and do not run them in parallel on the same collection. If it persists, investigate the operation holding the resource in the mongod logs.

Open in DBAtlas →

More from this engine