Setting allowDiskUse:true in MongoDB connector for Airbyte

Summary

Error message ‘Sort exceeded memory limit’ in MongoDB connector for Airbyte. Need to set allowDiskUse:true. Error log provides details.


Question

Hi, I am new to Airbyte and I am trying to create a connector from MongoDB to Snowflake. I am getting error Command failed with error 292 (QueryExceededMemoryLimitNoDiskUseAllowed): 'PlanExecutor error during aggregation :: caused by :: Sort exceeded memory limit of 33554432 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in.' Where do I set allowDiskUse:true ? Extract from error log for more details: 2024-05-14 17:02:53 [46mplatform[0m > ERROR main i.a.c.i.b.AirbyteExceptionHandler(uncaughtException):30 Something went wrong in the connector. See the logs for more details. com.mongodb.MongoCommandException: Command failed with error 292 (QueryExceededMemoryLimitNoDiskUseAllowed): 'PlanExecutor error during aggregation :: caused by :: Sort exceeded memory limit of 33554432 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in.' on server ********mongodb.net:27017. The full response is {"ok": 0.0, "errmsg": "PlanExecutor error during aggregation :: caused by :: Sort exceeded memory limit of 33554432 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in.", "code": 292, "codeName": "QueryExceededMemoryLimitNoDiskUseAllowed", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1715706174, "i": 21}}, "signature": {"hash": {"$binary": {"base64": "***=", "subType": "00"}}, "keyId": ***}}, "operationTime": {"$timestamp": {"t": 1715706174, "i": 21}}}



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.

Join the conversation on Slack

["mongodb-connector", "snowflake-connector", "allowdiskuse", "memory-limit", "error-log"]

What version of the Mongo and Snowflake are you using?

I am using MongoDB Atlas free tier. MongoDB version is 7.0.8 this is default version of MongoDB Atlas free tier. (I tried creating a source for MongoDB serverless version 7.3.2 but creation of source did not succeed, I guess serverless MongoDB Atlas is not supported)
In Airbyte MongoDB source connector version is 1.3.13 (this is the latest)

Snowflake version is 8.19.1. The Snowflake edition is - Business Critical
In Airbyte the Snowflake destination connector version 3.8.0

Both source and destinations are configured successfully. I get error when I create connector.
The data size of MongoDB is 48.2 MB which is greater than ort exceeded memory limit of 33554432 bytes (33.2 MB). For most of the production use cases 48 MB DB size would be fairly small.
In the connector code it should be using allowDiskUse:true as described here: https://www.mongodb.com/docs/manual/reference/method/db.collection.aggregate/

Sorry I was not clear, the Airbyte connector version.

I tried even on the Airbyte cloud and I still get error. I presume the Airbyte cloud is using latest version so this is not a version issue for my local Airbyte: