limit the size of tmp files created as part of $sort stage
Our docs says, "Starting in MongoDB 6.0, pipeline stages that require more than 100 megabytes of memory to execute write temporary files to disk by default."
These 'temporary files' can take up ALL the disk space if auto storage scale isn't turned on and crash the cluster.
1
vote
![](https://secure.gravatar.com/avatar/21aa2ba978c0cc2d0022067bf37aebcc?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)