Details
-
Bug
-
Resolution: Done
-
Minor - P4
-
1.8.3
-
None
-
None
-
Windows 7, Mongo 2.4.6, .Net 4.5
Description
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).