I am working on spring mongodb application [Environment: jdk 1.7, tomcat7 and CentOs system, Framework: spring 3.x, mongo-2.10],
We used `mongotemplate` to interface with mongo instance.
Initially application works fine but over a period of time we are experiencing mongodb connection failure problem.
We have tried to resolve the issue by changing mongo properties, also made changes related to tcp-keep-alive and networking settings
but still facing the same problem. After getting an error we checked mongo service it was running. Now we have to restart the
tomcat to make the application working.
Application Configurations
Mongo.properties:
Exception
org.springframework.dao.DataAccessResourceFailureException: can't call something : localhost/127.0.0.1:27017/pat_queue; nested exception is com.mongodb.MongoException$Network: can't call something : localhost/127.0.0.1:27017/pat_queue at org.springframework.data.mongodb.core.MongoExceptionTranslator.translateExceptionIfPossible(MongoExceptionTranslator.java:56) at org.springframework.data.mongodb.core.MongoTemplate.potentiallyConvertRuntimeException(MongoTemplate.java:1551) at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:1462) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1260) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1249) at