279 — ClientDisconnect
queryperformance
The operation exceeded the server memory limit for sorting or aggregation
What is happening?
ExceededMemoryLimit is returned when an operation (typically a sort or aggregation stage) uses more memory than the server allows. The default limit is 100 MB per pipeline stage. This is similar to error 292 (QueryExceededMemoryLimitNoDiskUseAllowed) but can appear in additional contexts beyond aggregation, including regular query sorts.
Common causes
- Sorting a large result set without an index that covers the sort
- Aggregation $group or $bucket accumulating too many entries in memory
- $lookup producing a very large result set
- In-memory sort on a collection with millions of documents