Adjust Maximum Time for Query Operations

The MaxTimeMS query bar option sets the cumulative time limit in milliseconds to process query bar operations. If the time limit is reached before the operation completes, Compass interrupts the operation.

MaxTimeMS Option

The default MaxTimeMS value is 5000. Consider raising this value if you have a very large collection, or your operations are frequently timing out. You can also consider creating indexes to improve query performance.

Set MaxTimeMS

  1. Click Options.
  2. Adjust MaxTimeMS to the desired value in milliseconds.

Learn More

To learn more about MaxTimeMS, see cursor.maxTimeMS() in the MongoDB manual.