I have some code the generates a series of BsonDocuments and tries to insert them into a Mongo Collection. On one of the documents, I get this error.
I can see that the size is larger than the reported MaxDocumentSize, but if I execute
directly towards the Mongo server, then et reports 48000000, which is significantly higher than the one reported in the error message.
I’m using the .net driver 2.11.3 (and have tried updating to 2.12.4 without success).
Is there a way to somehow compress the document being sent - like removing whitespaces in the json document?