Hi Guys,
Looking for mongodb help for the issue we are facing
Issue : mongodb instance connection timeout issue with instance unavailable message in the log file when mongodb primary instance goes into lock status while backup
Note : We are not able to replicate the issue from dev instance with same mongo client configuration and we are able to read the data from db instance from Intellij Idea Database Pane.
Error from the tomcat log :
Mar 15, 2023 2:06:35 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [appServlet] in context with path [/ws] threw exception [Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Timeout waiting for a pooled item after 30000 MILLISECONDS; nested exception is com.mongodb.MongoTimeoutException: Timeout waiting for a pooled item after 30000 MILLISECONDS] with root cause
com.mongodb.MongoTimeoutException: Timeout waiting for a pooled item after 30000 MILLISECONDS
mongoDB Client configuration :
<mongo:mongo-client credentials="${ddi.mongo.app.user}:${ddi.mongo.app.password}@${ddi.mongo.app.authenticationDatabase}" id="mongoClient" replica-set="${ddi.mongo.app.machine.one}:${ddi.mongo.app.port},${ddi.mongo.app.machine.two}:${ddi.mongo.app.port},${ddi.mongo.app.machine.three}:${ddi.mongo.app.port}">
<mongo:client-options connections-per-host="5"
threads-allowed-to-block-for-connection-multiplier="10"
connect-timeout="100000"
max-wait-time="30000"
socket-keep-alive="true"
socket-timeout="1000000"
write-concern="NORMAL"
read-preference="PRIMARY_PREFERRED"/>
</mongo:mongo-client>