I have installed Mongo 2.4.3 setup
When I want to try to execute a query in one of my collections, I get an error exception: BSONObj size: 0 (0x00000000) is invalid. Size must be between 0 and 16793600(16MB) First element: EOO
I already ran it db.repairDatabase, but it didn't seem to help.
When I just do db.collection.findOne(), it works fine, but when I do it, for example. db.collection.find({'_id': {'$gte': ObjectId("52631d000000000000000000")}}I get the error above.
I read that this may be due to a corrupt index, so I tried:
db.collection.reIndex();
{
"raw" : {
"rs0/ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com:27017,ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com:27017,ec2-xx-xx-xxx-xx.us-west-2.compute.amazonaws.com:27017" : {
"nIndexesWas" : 2,
"errmsg" : "exception: BSONObj size: 0 (0x00000000) is invalid. Size must be between 0 and 16793600(16MB) First element: EOO",
"code" : 10334,
"ok" : 0
}
},
"ok" : 0,
"errmsg" : "{ rs0/ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com:27017,ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com:27017,ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com:27017: \"exception: BSONObj size: 0 (0x00000000) is invalid. Size must be between 0 and 16793600(16MB) First element: EOO\" }"
}
I also deleted all indexes before doing this, there is only one left on _id
db.collection.getIndexes();
[
{
"v" : 1,
"key" : {
"_id" : 1
},
"ns" : "db.collection",
"name" : "_id_"
}
]
Still no luck, and I'm running out of ideas. Anyone have another suggestion? The collection contains about 900M documents, so I really need to restore this