Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What will happen if document size more than 16mb in MongoDB?

Tags:

mongodb

I have some document witch size 15 mb.What happen if size will be more than 16 mb? I have more nested arrays in this document (not files)? Please tell me? Thanks!

like image 235
user3555429 Avatar asked Apr 24 '14 13:04

user3555429


2 Answers

To answer the actual question: Operations that try to insert a document larger than 16MB or try to update an existing document in a way that makes it grow past 16MB will fail, the server will return an error.

Documents of this size are usually a sign of (very) bad design, but there are exceptions of course...

like image 188
mnemosyn Avatar answered Oct 01 '22 15:10

mnemosyn


There may be cases where your document size goes beyond 16 mb. GridFS should be able to solve your problem.

Look here for reference: http://docs.mongodb.org/manual/core/gridfs/

like image 36
Lalit Agarwal Avatar answered Oct 01 '22 15:10

Lalit Agarwal