Assertion: 10334:BSONObj size: 27624158 (0xDE82A501) is invalid. Size must be between 0 and 16793600(16MB) First element: _id: ObjectId('5329dd954a33b081be667532') . I am getting the above error when I run my .js file. I have two collections city and country which have more than 15 million record and I am doing indexing on some filed on those two collections. What may be the problem ?
Sounds like you either have a corrupt index or document.
I would try one of two things in the following order:
Repair the database http://docs.mongodb.org/manual/reference/command/repairDatabase/
if you are able to remove the corresponding document with the id: ObjectId('5329dd954a33b081be667532').
Stumbled upon similar issue. The field which I passed for _id
in $group
operation stage was absent in some documents hence, aggregation pipeline was throwing error of BSONObj size: 18441867 (0x119668B) is invalid
.
Issue was resolved for me when after adding {field_for_group:{$exists:true}}
in $match
stage of the aggregate pipeline.
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