com.mongodb.MongoException: timeout

JIRA | Abhinav Shah | 4 years ago
  1. 0

    Getting following exception when trying to do insert / udpate. <code> Caused by: com.mongodb.MongoException: timeout at com.mongodb.CommandResult.getException(CommandResult.java:100) at com.mongodb.CommandResult.throwOnError(CommandResult.java:134) at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:142) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:183) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:249) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:205) at com.mongodb.DBCollection.insert(DBCollection.java:57) at com.mongodb.DBCollection.insert(DBCollection.java:86) at com.mongodb.DBCollection.save(DBCollection.java:792) at com.mongodb.DBCollection.save(DBCollection.java:768) ----------------------------------------------------------------------- com.mongodb.MongoException: timeout at com.mongodb.CommandResult.getException(CommandResult.java:100) at com.mongodb.CommandResult.throwOnError(CommandResult.java:134) at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:142) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:183) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155) at com.mongodb.DBApiLayer$MyCollection.update(DBApiLayer.java:328) at com.mongodb.DBCollection.update(DBCollection.java:160) at com.mongodb.DBCollection.update(DBCollection.java:191) </code> Data gets persisted to the DB though. On second attempt, I don't get the exception. Also this is very intermittent and most often happens when the server is idle for a while.

    JIRA | 4 years ago | Abhinav Shah
    com.mongodb.MongoException: timeout
  2. 0

    GitHub comment 58#8742836

    GitHub | 4 years ago | bguerout
    com.mongodb.MongoException: Mod on _id not allowed
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    GitHub comment 29#210543121

    GitHub | 8 months ago | NorfAlrin
    com.mongodb.MongoException: '$set' is empty. You must specify a field like so: {$mod: {<field>: ...}}

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.mongodb.MongoException

      timeout

      at com.mongodb.CommandResult.getException()
    2. MongoDB Java Driver
      DBCollection.update
      1. com.mongodb.CommandResult.getException(CommandResult.java:100)
      2. com.mongodb.CommandResult.throwOnError(CommandResult.java:134)
      3. com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:142)
      4. com.mongodb.DBTCPConnector.say(DBTCPConnector.java:183)
      5. com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155)
      6. com.mongodb.DBApiLayer$MyCollection.update(DBApiLayer.java:328)
      7. com.mongodb.DBCollection.update(DBCollection.java:160)
      8. com.mongodb.DBCollection.update(DBCollection.java:191)
      8 frames