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

MongoDB Cursor timeout

      I'm using an sharded-cluster with a java application. After a specifid time (10 minutes or more) I got the following exception:

      com.mongodb.MongoException$Network: Read operation to server cs-mongo-mongo-west-t/10.4.0.110:3306 failed on database mdb
              at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:253)
              at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216)
              at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288)
              at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273)
              at com.mongodb.DBCursor._check(DBCursor.java:368)
              at com.mongodb.DBCursor._hasNext(DBCursor.java:459)
              at com.mongodb.DBCursor._fill(DBCursor.java:518)
              at com.mongodb.DBCursor.toArray(DBCursor.java:553)
              at com.mongodb.DBCursor.toArray(DBCursor.java:542)
              at com.pribas.messagesdb.impl.GetMessagesDBHandlerImpl.handleRequest(GetMessagesDBHandlerImpl.java:86)
              at com.pribas.messagesdb.impl.MessagesDBHandlerImpl.handleRequest(MessagesDBHandlerImpl.java:37)
              at com.pribas.messagesdb.service.MessageServlet.processRequest(MessageServlet.java:161)
              at com.pribas.messagesdb.service.MessageServlet.doPost(MessageServlet.java:86)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      Caused by: java.net.SocketException: Zeitlimit f\303\274r Verbindung \303\274berschritten
              at java.net.SocketInputStream.socketRead0(Native Method)
              at java.net.SocketInputStream.read(Unknown Source)
              at java.net.SocketInputStream.read(Unknown Source)
              at java.io.BufferedInputStream.fill(Unknown Source)
              at java.io.BufferedInputStream.read1(Unknown Source)
              at java.io.BufferedInputStream.read(Unknown Source)
              at org.bson.io.Bits.readFully(Bits.java:46)
              at org.bson.io.Bits.readFully(Bits.java:33)
              at org.bson.io.Bits.readFully(Bits.java:28)
              at com.mongodb.Response.<init>(Response.java:40)
              at com.mongodb.DBPort.go(DBPort.java:142)
              at com.mongodb.DBPort.call(DBPort.java:92)
              at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244)
              ... 30 more
      

      Is there a way to disable this timeout of the cursor within the sharded-cluster or within the config-file?

      Thank you very much,
      Daniel

            Assignee:
            Unassigned Unassigned
            Reporter:
            semirben Daniel Heitepriem
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: