MongoClient Async driver 3.0.4 - issue with thread waits

356 views
Skip to first unread message

Manikandan Kaliyaperumal

unread,
Dec 23, 2015, 7:01:46 AM12/23/15
to mongodb-user
Hi,

We have mongo 3.0.4 and having this below issue.


WE have set Metaspaced -XX:MaxMetaspaceSize=128 m and the below error is appearing several times now  in the logs. Any pointers on this would be highly appreciated.

com.mongodb.MongoSocketReadException: Prematurely reached end of stream

        at com.mongodb.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:218) ~[mongodb-driver-core-3.0.4.jar:na]

Also shown below is the thread dump captured .

 

"cluster-ClusterId{value='5679b5536725a1531554bfb3', description='Marketplace'}-sv2lxmkpd01:27017" #185 daemon prio=5 os_prio=0 tid=0x00007fbe6c009000 nid=0x7ac0 waiting on condition [0x00007fbe827c1000]

   java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for  <0x00000000fa33d3a0> (a java.util.concurrent.CountDownLatch$Sync)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)

        at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)

        at com.mongodb.connection.FutureAsyncCompletionHandler.get(FutureAsyncCompletionHandler.java:57)

        at com.mongodb.connection.FutureAsyncCompletionHandler.getRead(FutureAsyncCompletionHandler.java:52)

        at com.mongodb.connection.AsynchronousSocketChannelStream.read(AsynchronousSocketChannelStream.java:111)

        at com.mongodb.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:491)

        at com.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:221)

        at com.mongodb.connection.CommandHelper.receiveReply(CommandHelper.java:134)

        at com.mongodb.connection.CommandHelper.receiveCommandResult(CommandHelper.java:121)

        at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32)

        at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:186)

        at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:134)

        - locked <0x00000000fa33b6a0> (a com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable)

        at java.lang.Thread.run(Thread.java:745)

 

   Locked ownable synchronizers:

        - <0x00000000fa32f1a0> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)


Thanks,

Mani

 

Jeff Yemin

unread,
Dec 23, 2015, 10:11:06 AM12/23/15
to mongod...@googlegroups.com
Hi Mani,

You mention that you set -XX:MaxMetaspaceSize=128.  If you remove that, does the problem go away? I suspect that the exception is unrelated to that setting, but it would be good to know.

Other than that, can you answer some other questions please?
  • Is your application connected to a standalone server, a replica set, or one or more mongos?  Any changes to the default MongoClientSettings?
  • Were any of the servers unavailable during the time that you were seeing these exceptions and stack traces?  Were any servers restarted, or, if connected to a replica set, was there a stepdown of the primary?
  • Did the application eventually recover, or did you have to restart it?

Regards,
Jeff

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/e2c39e10-fa8d-4879-93e9-be7527b53e90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages