user8590996
user8590996

Reputation:

Mongodb: allowDiskUse: true is not working in mongoose

I have a mongo query which have multiple lookup but it returns me a error

Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in

I already add allow disk size true in my aggregation query

await Service.aggregate(pipeline) .allowDiskUse(true) .exec();

Upvotes: 3

Views: 4605

Answers (1)

kheengz
kheengz

Reputation: 1018

Is your paid Atlas cluster shared tier (M2 or M5)? The allowDiskUse option currently requires a dedicated cluster (M10+) - see Operation Limitation. NB. this is from @stennie

Upvotes: 7

Related Questions