Known Information: Its is know that MongoDB stores in BSON (Binary JSON) and the maximum BSON document size is 16MB.
Question: Why 16MB itself why not 32MB or 64MB or still more and where exactly the limit has been put for 16MB and what are the reasons to depend on exactly 16MB?
It is mentioned that during transmission, excessive amount of bandwidth will not be consumed and does not require excessive amount of RAM at server. But What if we can afford the network bandwidth and RAM memory consumption. Then also, we are left with no option other than GridFS. Why?
It may sound stupid. But please could anyone put some bright light on this?
mongodb BSON size
We can check it on Mongo Shell by issuing following command
db.isMaster().maxBsonObjectSize/(1024*1024)
Why it is not allowed as configurable by DBAs?
The maximum size an individual document can be in MongoDB is 16MB with a nested depth of 100 levels. Edit: There is no max size for an individual MongoDB database.
Explanation. 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.
MongoDB Single Document size limit is 16MB.
Check out the thread on the JIRA ticket that increased the value from 4MB to 16MB. There is a sizeable debate on the ticket: https://jira.mongodb.org/browse/SERVER-431
It seems to be arbitrary why they chose 16MB, and not say 32MB. It was increased because many people needed to store documents larger than 4MB (and I presume lower than 16MB). Some people have asked in that thread to have it made configurable (like you asked), which makes sense to me. Not sure why they haven't decided to do this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With