com.mongodb.MongoException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • weird arithmetic
    via by Shi Shei,
  • I'm using the Java driver v2.7.2 to query a sharded system consisting of 4 shards, each 3 replicas, running linux-mongodb-v2.0.1, v2.0.2 and v2.0.4. All mongos are running v2.0.1. The query I'm executing is of this type: {_id:{$in:[1,2,3,4]}} When the inlist becomes too big (more than 265,000 id's in my case), I get the following exception, where max BSON size is greater than 2.6 times of the DBObject size: Exception in thread "main" com.mongodb.MongoInternalException: DBObject of size 6442515 is over Max BSON size 16777216 at com.mongodb.OutMessage.putObject(OutMessage.java:147) at com.mongodb.OutMessage._appendQuery(OutMessage.java:85) at com.mongodb.OutMessage.query(OutMessage.java:44) at com.mongodb.OutMessage.query(OutMessage.java:38) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:303) at com.mongodb.DBCursor._check(DBCursor.java:369) at com.mongodb.DBCursor._hasNext(DBCursor.java:498) at com.mongodb.DBCursor.hasNext(DBCursor.java:523) When I reuse the mongo object, I don't get the exception. Moreover, I can put up to 995,000 id's into the list without any problem. Exceeding the inlist size results in an appropriate exception: Exception in thread "main" com.mongodb.MongoException: could not initialize cursor across all shards because : combinatorial limit of $in partitioning of result set exceeded @ offerStoreDE4/ s115:27018,s132:27018,s125:27018 at com.mongodb.MongoException.parse(MongoException.java:82) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:312) at com.mongodb.DBCursor._check(DBCursor.java:369) at com.mongodb.DBCursor._hasNext(DBCursor.java:498) at com.mongodb.DBCursor.hasNext(DBCursor.java:523) However, when it's the first usage of the Mongo object then it's not yet reused and will fail as described above. For more details, please see: http://groups.google.com/group/mongodb-user/browse_thread/thread/3b96668396f0f9d4
    via by kay.agahd,
  • unauthorized db lock type:-1
    via Stack Overflow by Alex
    ,
  • Data retrieval from mongodb java api
    via Stack Overflow by Jose Ramon
    ,
    • com.mongodb.MongoException: could not initialize cursor across all shards because : combinatorial limit of $in partitioning of result set exceeded @ offerStoreDE4/ s115:27018,s132:27018,s125:27018 at com.mongodb.MongoException.parse(MongoException.java:82) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:312) at com.mongodb.DBCursor._check(DBCursor.java:369) at com.mongodb.DBCursor._hasNext(DBCursor.java:498) at com.mongodb.DBCursor.hasNext(DBCursor.java:523)

    Users with the same issue

    Unknown visitor1 times, last one,
    sriharshakiran
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    1 more bugmates