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

From: Luke Lovett <luke.lovett@xxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Wed, 4 May 2016 10:59:44 -0700 (PDT)
Why ads?
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--.

On Sunday, May 1, 2016 at 6:26:24 AM UTC-7, mutaherul.islam@xxxxxxxxxxxx 
wrote:


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




-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/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+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
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/09ade170-5cb4-46a6-83cd-df007c2a0310%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?