Hadoop mapper failing due to org.mongodb.driver.connection maximum allowed idle time

306 views
Skip to first unread message

mutaher...@infolytx.com

unread,
May 1, 2016, 9:26:24 AM5/1/16
to mongodb-user

Hi 
i am facing this error bellow:
org.mongodb.driver.connection (pool-1-thread-1): Closed connection [connectionId{localValue:2, serverValue:37912}] to 192.168.0.114:27017 because it is past its maximum allowed idle time.

I doing map reduce at Amazon EMR and my mongodb is running at amazon cloud EC2 ubuntu machine.

My Driver java code :
MongoConfig mongoConfig = new MongoConfig(jobConf);
mongoConfig.setSplitSize(10);
mongoConfig.setInputFormat(MongoInputFormat.class);
        mongoConfig.setOutputFormat(MongoOutputFormat.class);
        MongoClientOptions options
                = new MongoClientOptions.Builder()
                .maxWaitTime(600000)
                .connectTimeout(600000)
                .maxConnectionIdleTime(600000)  
                .connectionsPerHost(51100)
                .build();
        MongoClientURI mcUri = new MongoClientURI(mongoInputURI, MongoClientOptions.builder(options));
        
        mongoConfig.setInputURI(mcUri);

My maven lib :
 <groupId>org.mongodb.mongo-hadoop</groupId>
 <artifactId>mongo-hadoop-core</artifactId>
 <version>1.5.2</version>
and 
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.2.2</version>


i have attached my EMR syslog.


Can you please suggest me any solution ?


Thanks 

Mutaherul

log.txt

Luke Lovett

unread,
May 4, 2016, 1:59:44 PM5/4/16
to mongodb-user
This doesn't look like an error to me, and the job looks like it's continuing to run. Does the job fail at the end? This message just means that the connection hasn't been used in a long time, so it was replaced with a fresh one. See http://api.mongodb.org/java/current/com/mongodb/MongoClientOptions.html#getMaxConnectionIdleTime--.
Reply all
Reply to author
Forward
0 new messages