Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10578

MongoDB depth levels of nesting for BSON documents

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Works as Designed
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      Customer is getting an error while performing initial sync in version 3.4.6:

      'BSONObj exceeded maximum nested object depth: 200

      In MongoDB docs we can see this documented but with *100* levels of nesting:

      Nested Depth for BSON Documents.

      MongoDB supports no more than 100 levels of nesting for BSON documents.

      In the code:

      • mongo/src/mongo/bson/bson_depth.h:

        // The default BSON depth nesting limit.
            static constexpr std::int32_t kDefaultMaxAllowableDepth = 200;

      • mongo/src/mongo/bson/bson_validate.cpp:

        return {ErrorCodes::Overflow,
                                    str::stream() << "BSONObj exceeded maximum nested object depth: "
                                                  << BSONDepth::getMaxAllowableDepth()};

      Attachments

        Activity

          People

            Unassigned Unassigned
            conchi.bueno@mongodb.com Conchi Bueno
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 29 weeks ago