Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Jokes
Docs Menu
Docs Home
/ / /

Adjust Maximum Time for Query Operations

The MAX TIME MS 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, Atlas interrupts the operation.

MaxTimeMS Option
click to enlarge

The default MAX TIME MS value is 60000, or 60 seconds. Consider raising this value if you meet one of the following conditions:

  • You have a large collection.

  • Your operations frequently time out.

  • You query data archived from the Atlas cluster using Online Archive.

You can also consider creating indexes to improve query performance.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Data Explorer under the Database heading.

    The Data Explorer displays.

Note

You can also go to the Clusters page, and click Data Explorer under the Shortcuts heading.

2
  1. Select the collection.

  2. Click Options.

  3. Adjust MAX TIME MS to the desired value in milliseconds.

To learn more about MAX TIME MS, see cursor.maxTimeMS() in the MongoDB manual.

Back

Sort Returned Documents