Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-866

LazyBsonDocument cannot deserialize documents above 4mb in size

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.9
    • Affects Version/s: 1.8.3
    • Component/s: None
    • None
    • Environment:
      Windows 7, Mongo 2.4.6, .Net 4.5

      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).

            Assignee:
            sridhar Sridhar Nanjundeswaran
            Reporter:
            buwaldanate@johndeere.com Nate Buwalda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: