Hello Team, We do face similar issue, we are working in a docker containers where as the Mongo Client driver connects to Mongo DB, and getting the below stack trace… We able to resolve this issue when restart the application or the containers. This issue seen randomly on any of the containers or some times in all the containers. for any use case restarting the application / containers resolving the issue. We use org.mongodb.Mongo-java_driver 3.12.9 & org.mongodb.driver-async 3.12.9 drivers… below is the trace we see…
Please suggest on the same, what can be the root cause:
Container-s118 2025-03-07 06:57:49,205 [pool-92-thread-1] ERROR audit.log - Storage failed - terminating flow message: {DB-Timed out after 500 ms while waiting for a server that matches WritableServerSelector. Client view of cluster state is {type=REPLICA_SET, servers=[{address=2606:ae00:XXXX:XXX::14:27022, type=REPLICA_SET_SECONDARY, roundTripTime=23.8 ms, state=CONNECTED}, {address=2606:ae00:XXXX:XXX::14:27022, type=REPLICA_SET_SECONDARY, roundTripTime=14.8 ms, state=CONNECTED}, {address=2606:ae00:XXXX:XXX::13:27022, type=REPLICA_SET_SECONDARY, roundTripTime=21.3 ms, state=CONNECTED}, {address=2606:ae00:XXXX:XXX::13:27022, type=UNKNOWN, state=CONNECTING}]}