50 — MaxTimeMSExpired
queryperformancetimeout
The operation exceeded its maxTimeMS time limit
What is happening?
MaxTimeMSExpired indicates the operation did not complete within the maxTimeMS limit. This typically points to a slow query, a missing index, or a server under heavy load. The maxTimeMS option can be set per-operation to prevent long-running queries from consuming server resources indefinitely.
Common causes
- Missing or inefficient index for the query pattern
- Collection scan on a large collection
- Server under heavy CPU or I/O load
- maxTimeMS set too low for the expected query duration
- Lock contention from concurrent operations