Niranjan Nimbarte
Niranjan Nimbarte

Reputation: 95

How to increase the document size of mongodb(More than 16MB)?I

I am not able increase file size more than 16 MB . I don't have option to create more than one document. I read many blogs regarding the same but, I do not got any particular solution. I want to adjust data in single file which is 30 MB in size

Upvotes: 7

Views: 13845

Answers (1)

ymz
ymz

Reputation: 6924

From the docs (https://docs.mongodb.com/manual/reference/limits/#bson-documents):

BSON Document Size 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. See mongofiles and the documentation for your driver for more information about GridFS.

The only question remains: Are you sure you need a single document that large?

Upvotes: 5

Related Questions