Viren
Viren

Reputation: 5962

Exceded maximum insert size of 16,000,000 bytes + mongoDB + ruby

I have an application where I'm using mongodb as a database for storing record the ruby wrapper for mongodb I'm using is mongoid

Now everything was working fine until I hit a above error

Exceded maximum insert size of 16,000,000 bytes

Can any pin point how to get rid of errors.

I'm running a mongodb server which does not have a configuration file (no configuration was provide with mongodb source file)

Can anyone help

Upvotes: 1

Views: 1017

Answers (2)

user2665694
user2665694

Reputation:

The limit of 16MB data per document is a very well known limitation. Use GridFS for storing arbitrary binary data of arbitrary size + metadata.

Upvotes: 2

Davita
Davita

Reputation: 9124

You have hit the maximum limit of a single document in MongoDB. If you save large data files in MongoDB, use GridFs instead. If your document has too many subdocuments, consider splitting it and use relations instead of nesting.

Upvotes: 6

Related Questions