I see a few MongoExceptions caused by SocketTimeoutException (see the stack trace below). That is, client failed to get a response within the timeout (30 sec.). Now I wonder how to fix it.
The trivial solution is to increase the timeout but I'd like to understand the root cause first. What would you suggest?
caused by java.net.SocketTimeoutException: Read timed out
java.net.SocketInputStream.socketRead0 (Native Method)
java.net.SocketInputStream.read (SocketInputStream.java:152)
java.net.SocketInputStream.read (SocketInputStream.java:122)
java.io.BufferedInputStream.read1 (BufferedInputStream.java:273)
java.io.BufferedInputStream.read (BufferedInputStream.java:334)
com.mongodb.Response$MyInputStream.read (Response.java:168)
org.bson.BasicBSONDecoder$BSONInput.fill (BasicBSONDecoder.java:386)
org.bson.BasicBSONDecoder$BSONInput.readUTF8String (BasicBSONDecoder.java:460)
org.bson.BasicBSONDecoder.decodeElement (BasicBSONDecoder.java:155)
org.bson.BasicBSONDecoder._decode (BasicBSONDecoder.java:79)
org.bson.BasicBSONDecoder.decode (BasicBSONDecoder.java:57)
com.mongodb.DefaultDBDecoder.decode (DefaultDBDecoder.java:61)
com.mongodb.Response. (Response.java:83)
com.mongodb.DBPort.go (DBPort.java:142)
com.mongodb.DBPort.call (DBPort.java:92)
com.mongodb.DBTCPConnector.innerCall (DBTCPConnector.java:244)
com.mongodb.DBTCPConnector.call (DBTCPConnector.java:216)
com.mongodb.DBApiLayer$MyCollection.__find (DBApiLayer.java:288)
com.mongodb.DBApiLayer$MyCollection.__find (DBApiLayer.java:273)
com.mongodb.DBCollection.findOne (DBCollection.java:728)
com.mongodb.DBCollection.findOne (DBCollection.java:708)