Command aggregate failed: Exceeded memory limit for $group, but didn't allow external sort
Answers
Smith
2890
Points
78
Posts
|
Set options in aggregation as mentioned in the error message:
as
References:
Posted On:
12-Oct-2021 22:20
Thanks. Works for me. - mongo 17-Oct-2021 22:57
|
Rahul M...
4916
Points
27
Posts
|
Aggregation pipeline stages have maximum memory uses limit in mongodb. To handle large datasets, you are required to set allowDiskUse option to true to enable writing data to temporary files in disk storage. Aggregate like sort, group have a maximum of RAM configured, but when exceeded instead of abort the operation it will continue using disk file storage instead of RAM, if the allowDiskUse has been set to true.
Note: Data in memory is faster than working with data on hard drive. With hard drive data transfer the aggregation operation will need to keep transferring data between the operation, memory and the hard disk.
Posted On:
17-Oct-2021 22:43
|
Blog
Active User (0)
No Active User!