|
We were experimenting with LazyBsonDocument to try to address a memory issue that we are having in our application. We encountered the following exception when trying to read one of our larger documents (~10 mb):
Unhandled Exception: System.IO.FileFormatException: Size 10891020 is not valid because it is larger than MaxDocumentSize 4194304.
|
at MongoDB.Bson.IO.BsonBinaryReader.ReadSize() in c:\projects\mongo-csharp-driver\MongoDB.Bson\IO\BsonBinaryReader.cs: line 706
|
In reviewing the source for LazyBsonDocument, it looks like its BinaryBsonReader settings are using the defaults instead of the server configuration. The defaults appear to be set to 4mb (in BsonDefaults).
|