DBAtlas · Database operations atlas

262: ExceededTimeLimit (error code 262)

MongoDB

What does it mean?

The operation exceeded the time limit allowed on the server side and was terminated. Exceeding maxTimeMS or internal time limits can cause this error.

Why does it happen?

A long-running query/command, slow execution due to a missing index, heavy aggregation, scanning a large data set, or heavy server load.

How to fix it

Inspect the query with explain() and add an appropriate index. Split the operation into smaller chunks. Set maxTimeMS according to the actual need. Reduce data early in the aggregation pipeline with $match/$project. Verify that server resources are sufficient.

Open in DBAtlas →

More from this engine