Skip to content

Gorm Mongodb Connection timeout resolution

October 1, 2013

We faced connection timeout when using mongodb driver:

At this time Mongodb has released their new mongodb java driver version  that is a fix for issue

To use this latest driver do the following, Set excludes in the plugin dependencies.And add this jar to dependency list:

compile "org.mongodb:mongo-java-driver:2.11.3"
compile (":mongodb:1.3.0"){
excludes "mongo-java-driver";

As of date today – 1st oct, 3.0.0 is not release so you will get below error if u add it :
Loading Grails 2.3
| Configuring classpath
| Error Resolve error obtaining dependencies: Could not find artifact org.mongodb:mongo-java-driver:jar:3.0.0 in grailsCentral (

This should resolve below error:
Connection wait timeout after 120000 ms. Stacktrace follows:
com.mongodb.DBPortPool$ConnectionWaitTimeOut: Connection wait timeout after 120000 ms
at com.mongodb.DBPortPool.get(
at com.mongodb.DBTCPConnector$MyPort.get(
at com.mongodb.DBTCPConnector.innerCall(
at com.mongodb.DBApiLayer$MyCollection.__find(
at com.mongodb.DB.command(
at com.mongodb.DB.command(
at com.mongodb.DBCollection.getCount(

2 Comments leave one →
  1. Anonymous permalink
    October 10, 2013 5:51 pm

    I had the same issue and I’ve upgraded the java driver to 2.11.3.. still facing the same issue. 😦

  2. Anonymous permalink
    December 30, 2013 4:09 pm

    me too

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: