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

LazyBsonDocument cannot deserialize documents above 4mb in size

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 1.8.3
    • Fix Version/s: 1.9
    • Component/s: None
    • Labels:
      None
    • Environment:
      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).

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: