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

Mongo Driver with bad connection hanging forever and not timing out

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 3.5.0
    • Component/s: Connection Management
    • Labels:
      None

      Hi,

      We are having a weird issue with Mongo java driver 3.5.0. We have following error initially returned by Mongo and application is handling error smoothly. But after this error, whatever next request picks mongo connection, Next request is hanging forever and not timing out after a certain interval.

       

      1. client-options
        mongo.connectionsPerHost=20
        mongo.threadsAllowedToBlockForConnectionMultiplier=2
        mongo.connectTimeout=30000
        mongo.maxWaitTime=10000
        mongo.socketKeepAlive=true
        mongo.socketTimeout=20000
        mongo.maxConnectionIdleTime=300000
        mongo.maxConnectionLifeTime=43200000
        mongo.heartbeatFrequency=3600000
        mongo.minHeartbeatFrequency=500
        mongo.heartbeatConnectTimeout=20000
        mongo.heartbeatSocketTimeout=20000

       

      Caused by: com.mongodb.MongoQueryException: Query failed with error code 35 and error message '' on server localhost:27017Caused by: com.mongodb.MongoQueryException: Query failed with error code 35 and error message '' on server localhost:27017 at com.mongodb.connection.ProtocolHelper.getQueryFailureException(ProtocolHelper.java:131) at com.mongodb.connection.GetMoreProtocol.execute(GetMoreProtocol.java:88) at com.mongodb.connection.GetMoreProtocol.execute(GetMoreProtocol.java:49) at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:159) at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:289) at com.mongodb.connection.DefaultServerConnection.getMore(DefaultServerConnection.java:254) at com.mongodb.operation.QueryBatchCursor.getMore(QueryBatchCursor.java:218) at com.mongodb.operation.QueryBatchCursor.hasNext(QueryBatchCursor.java:105) at com.mongodb.MongoBatchCursorAdapter.hasNext(MongoBatchCursorAdapter.java:46) at com.mongodb.DBCursor.hasNext(DBCursor.java:145) at com.mongodb.DBCursor.fillArray(DBCursor.java:910) at com.mongodb.DBCursor.toArray(DBCursor.java:655) at com.mongodb.DBCursor.toArray(DBCursor.java:643)

       

        1. ErrorLog1.txt
          8 kB
        2. ThreadDump.txt
          5 kB

            Assignee:
            Unassigned Unassigned
            Reporter:
            pitani RameshPitani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: