C100DBA practice question 8 of 25

Aggregation Pipelines have a limit of:

Full set: 130 questions
Answer options
A: No limit on document and 100 MB RAM
B: 2 MB document and no limit on RAM
C: 2 MB document and 100 MB RAM
D: 16 MB document and 100 MB RAM Correct answer
Correct Answer:
D. 16 MB document and 100 MB RAM
Explanation

MongoDB aggregation pipelines are subject to two primary resource limits. First, each document in the pipeline, including the final result documents, cannot exceed the maximum BSON document size, which is 16 megabytes. Second, individual aggregation stages have a default memory limit of 100 megabytes to perform their operations. For memory-intensive stages like $group or $sort, if this limit is exceeded, the operation will fail unless the allowDiskUse: true option is specified, which allows MongoDB to write data to temporary files on disk.

Why Incorrect

A. There is a strict 16 MB limit on BSON document size; it is not unlimited.
B. The document size limit is 16 MB, not 2 MB, and there is a default 100 MB RAM limit per stage.
C. The document size limit is 16 MB, not 2 MB. The 100 MB RAM limit is correct, but the document limit is not.

References

- MongoDB Documentation

Aggregation Pipeline Limits. This page explicitly states the 100 MB memory limit for pipeline stages and the allowDiskUse option.

- MongoDB Documentation

BSON Document Size. This page defines the 16 megabyte maximum size for any BSON document.

- MongoDB University

M103 Basic Cluster Administration. Course materials cover replica set architecture and operational limits

including aggregation pipeline constraints.

Scroll to Top