292 — QueryExceededMemoryLimitNoDiskUseAllowed
queryperformance
Aggregation exceeded the memory limit and allowDiskUse is not enabled
What is happening?
QueryExceededMemoryLimitNoDiskUseAllowed is returned when an aggregation pipeline stage (such as $sort, $group, $bucket, or $facet) exceeds the per-stage memory limit (default 100 MB) and the pipeline was not run with allowDiskUse: true. Without disk spillover, the server aborts the pipeline to prevent excessive memory consumption.
Common causes
- $sort on a large result set without an index that supports the sort order
- $group accumulating too many distinct groups in memory
- $facet running multiple sub-pipelines that individually exceed the limit
- $lookup producing a large joined result set
- The 100 MB default limit is too small for the dataset