Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-719

Getting "com.mongodb.MongoException: timeout" even when data is persisted on update operation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.9.3, 2.10.1
    • Component/s: Connection Management
    • Labels:
      None
    • Environment:
      red hat linux 64 bit.

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            abhinav.shah@gmail.com Abhinav Shah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: