---
title: "Comment by Rishabh Rawat on \"Aggregation in MongoDB\" | Hashnode"
description: "Hey Saurabh, liked the quick introduction to the aggregation pipeline. Just wanted to highlight that some stages have a max space limit on the number of documen"
url: "https://hashnode.com/posts/aggregation-in-mongodb/62594c412f84e0d4fc33b1cb/comment/6259ae0552fb7bd53380d765"
---

[Discussion](https://hashnode.com/posts/aggregation-in-mongodb/62594c412f84e0d4fc33b1cb)

Comment [Aggregation in MongoDB](https://hashnode.com/posts/aggregation-in-mongodb/62594c412f84e0d4fc33b1cb)

[Rishabh Rawat](https://hashnode.com/@rrawat)

[Apr 15, 2022](https://hashnode.com/posts/aggregation-in-mongodb/62594c412f84e0d4fc33b1cb/comment/6259ae0552fb7bd53380d765)

Hey Saurabh, liked the quick introduction to the aggregation pipeline.

Just wanted to highlight that some stages have a [max space limit on the number of documents](https://www.mongodb.com/docs/manual/core/aggregation-pipeline-limits/#memory-restrictions) it can process.

For example, group stage can only process documents of size 100MB at max. To get around this limitation, one needs to allow disc use.

[Saurabh Bomble](https://hashnode.com/@saurabh-107)

[Apr 17, 2022](https://hashnode.com/posts/aggregation-in-mongodb/62594c412f84e0d4fc33b1cb/comment/6259ae0552fb7bd53380d765#reply-625bc7a752fb7bd53380fadb)

Ohh thanks, I didn't know that.
