Set Max Time MS for Aggregation Queries
On this page
Use the Max Time MS option on the Aggregations tab to specify an upper time limit in milliseconds for aggregation pipelines that run in MongoDB Compass.
About this Task
By default, Max Time MS is set to 60000 milliseconds, or 60 seconds. Consider raising this value if you have a large collection or your operations frequently time out. Alternatively, consider lowering the Max Time MS value to quickly identify inefficient or resource-intensive pipeline operations.
If you already specified a maxTimeMS
value in the Compass Settings
panel, the command line, or
a configuration file, the Max Time MS
that you specify for your pipeline must be lower than the limit you previously
specified.
If your aggregation operation goes over the time limit, Compass raises a timeout error.