Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 943
Niranjan Nimbarte Avatar asked Feb 16 '17 11:02

Niranjan Nimbarte


People also ask

What is the maximum size of a MongoDB document 16 MB 12 MB 2 MB There is no maximum size it depends on the RAM?

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.

What is the maximum size of a document MongoDB allows?

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.

What is the maximum size of a MongoDB document 1/32 2 16 3 There is no maximum size it depends on RAM?

MongoDB Single Document size limit is 16MB.

How can I store large files in MongoDB?

In MongoDB, use GridFS for storing files larger than 16 MB. In some situations, storing large files may be more efficient in a MongoDB database than on a system-level filesystem. If your filesystem limits the number of files in a directory, you can use GridFS to store as many files as needed.


1 Answers

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?

like image 77
ymz Avatar answered Oct 19 '22 11:10

ymz