When we are upgrading AEM 6.1 instance with mongo (Mongo version: 2.6 ) to AEM 6.3 with mongo (Mongo version: 3.2) we are facing the exception.

org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore Background operation failed: org.bson.BsonSerializationException: Document size of 29344731 is larger than maximum of 16777216.

How DocumentNodestore exceeds its limit? Is there anyway to resolve the issue? Is revision garbage collection will reduce the DocumentNodeStore size?

  • As per MongoDB documentation the maximum BSON document size is 16 megabytes. If you want to store more than 16 MB size of document in MongoDB. Then use the GridFS. – Md Haidar Ali Khan Mar 30 '18 at 19:37

As per MongoDB BOL here The maximum BSON document size is 16 megabytes.

The maximum document size helps ensure that a single document cannot use excessive amount of RAM or, during transmission, excessive amount of bandwidth. To store documents larger than the maximum size, MongoDB provides the GridFS API.

GridFS is a specification for storing and retrieving files that exceed the BSON-document size limit of 16 MB.

For your further ref here and here

  • 1
    I'm a new user. No matter how you wrap it, this s*cks. – Michał Leon Feb 14 '20 at 19:41
  • What's worse--Mongo lets you write huge documents but not read them back into RAM – duhaime Dec 20 '20 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.