MongoDb Buffer Coarsening 16MB

I'm trying to run an aggregated mongo db query from C # but the buffer size is over 16MB. Is there any way to tweak the buffer size or any other workaround. I have no way to create a collection on the server side of mongo, nor do I have any mongo utility like mongo.exe or mongoExport.exe on my client system.

+3


source to share


1 answer


You can set AllowDiskUse and OutputMode in AggregateArgs to allow over 16MB.

 var mongoPipeline = new AggregateArgs { Pipeline = pipeline, AllowDiskUse = true, OutputMode = AggregateOutputMode.Cursor };
 var response = Repository.Collection.Aggregate(mongoPipeline)

      



See MongoDB Reference for more information .

+1


source







All Articles