Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5954855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:01:49+00:00 2026-05-22T18:01:49+00:00

Using the 10gen C# driver for MongoDB, every once in a while in production

  • 0

Using the 10gen C# driver for MongoDB, every once in a while in production I’m seeing this error:

System.IO.FileFormatException: Size is larger than MaxDocumentSize at MongoDB.Bson.IO.BsonBinaryReader.ReadSize() in C:\work\10gen\mongodb\mongo-csharp-driver\Bson\IO\BsonBinaryReader.cs:line 556

Is there a way to make the MaxDocumentSize larger to prevent this error?

There is no way my document sizes are anywhere near 16MB, nor am I storing any files. Here is a sample document, which looks to be 13KB when I save it in notepad.

{
  "Address": "1080 DUNLAP ORPHANAGE RD",
  "Baths": null,
  "Beds": null,
  "Broker": "Crye-Leike, Inc., REALTORS |(901)840-1181",
  "City": "Unincorporated",
  "Coordinates": {
    "Latitude": 35.414949,
    "Longitude": -89.676481
  },
  "CreateDate": "Sun, 03 Apr 2011 19:40:11 GMT -04:00",
  "Description": "",
  "ExteriorConstruction": "Aluminum/Steel Siding, Double Pane Window(s), Vinyl Siding, Conventional Foundation",
  "ExteriorFeatures": "",
  "FireplaceFeatures": "In Den/Great Room, Masonry, Wood Stove Insert",
  "HasGarage": true,
  "HeatingFeatures": "Ceiling Heat, Central, Gas, Wood Stove",
  "HouseSize": null,
  "InteriorFeatures": "Double Vanity Bath, Split Bedroom Plan, BEDROOM 2: Carpet, Level 2, Walk-In Closet; BEDROOM 3: Carpet, Level 2, Walk-In Closet; BEDROOM 4: Carpet, Level 2, Private Half Bath, Walk-In Closet; Part Carpet, Part Hardwood, Sprayed Ceiling, Tile Floor, Wood Laminate Floors, Attic Access, Cable Available, Cable Wired, Central Vac, Mud Room, Walk-In Attic, Walk-In Closet(s), Breakfast Bar, Eat-In Kitchen, Pantry, Separate Dining Room, Washer/Dryer Connections, MASTER BATH: Carpet, Double Sinks, Dressing Area, Tile Floor; Gas Water Heater, Entry Hall",
  "IsActive": true,
  "ListingFeatures": [
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Status: ACTIVE"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "County: Tipton"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Approximately 10 acre(s)"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "2 total full bath(s)"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "2 total half bath(s)"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "9 total rooms"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "2 stories"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Type:  General Residential"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Master Bedroom is Carpet, Full Bath, Level 1, Walk-In Closet"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Basement is Partial, Unfinished"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Pool features:  Above Ground"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "2 covered parking space(s)"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Yes car garage(s)"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Attached parking"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Cooling features:  220 Wiring, Dual System,Cooling"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Inclusions:  Cooktop, Dishwasher, Gas Cooking, Microwave, Refrigerator, Satellite Dish, Self Cleaning Oven"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Lot features:  Chain Fenced, Landscaped, Level, Some Trees, Wooded"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Lot size is between 10 and 20 acres"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Utilities present:  Public Water, Septic Tank"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Swimming pool(s)"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Basement"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Den"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Laundry room"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Hardwood floors"
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "Name": "Parking features:  Driveway/Pad, Garage Door Opener(s), Storage Room(s), Workshop(s)"
    }
  ],
  "ListingPhotos": [
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m0x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m0t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m1x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m1t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m2x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m2t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m3x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m3t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m4x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m4t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m5x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m5t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m6x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m6t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m7x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m7t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m8x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m8t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m9x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m9t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m10x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m10t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    },
    {
      "_id": null,
      "CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
      "OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m11x.jpg",
      "OriginalPhoto": null,
      "OriginalPhotoUpdateDate": null,
      "ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m11t.jpg",
      "ThumbnailPhoto": null,
      "ThumbnailPhotoUpdateDate": null
    }
  ],
  "ListingPriceHistories": null,
  "ListingSalesHistories": [],
  "ListingTaxHistories": [],
  "LotSize": null,
  "MlsCreateDate": "Sat, 15 Jan 2011 19:40:04 GMT -05:00",
  "MlsId": "3215435",
  "MlsRefreshDate": "Sun, 03 Apr 2011 19:31:04 GMT -04:00",
  "Neighborhood": "Not Available",
  "Price": 290000,
  "PropertyType": "Single Family Home",
  "RealtorUrl": "http://realtor.com/realestateandhomes-detail/1080-dunlap-orphanage-rd_unincorporated_tn_38011_1124667517",
  "Roofing": "Composition Shingles",
  "State": "TN",
  "Stories": 2,
  "Style": "Traditional",
  "UpdateDate": "Sun, 03 Apr 2011 19:40:11 GMT -04:00",
  "YearBuilt": 1987,
  "ZipCode": "38011",
  "_id": {
    "$oid": "4d99055b1b9ba917bcef9443"
  }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:01:50+00:00Added an answer on May 22, 2026 at 6:01 pm

    Normally if your documents were too large you would expect to get this error when writing them to the database, not when reading them back.

    Can you provide some more information:

    • which version of the C# driver are you using?
    • which version of the server are you using?
    • do you know the size of the document that is causing this?
    • can you successfully retrieve this document using the mongo shell or another driver?

    If you are willing to build the driver yourself you could set a breakpoint on the line that is throwing the exception and determine the size of the document and the max document size and report those numbers back.

    Thanks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using online interfaces to a version control system is a nice way to have
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
using CodeIgniter normally one has to specify the controllers in the config/routes.php file. This
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using JDeveloper , I started developing a set of web pages for a project
Using C#, I need a class called User that has a username, password, active

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.