We are seeing exceptions from our mongo db replica set. The databases have been up 100% and have not seen outages, but we see the following errors on client side.
zplv9353 is primary db.
2019-10-11 08:55:48.588 INFO 1 --- org.mongodb.driver.connection : Closed connection [connectionId{localValue:417, serverValue:30067}] to
abc.abc.com:18720 because there was a socket exception raised on another connection from this pool.
2019-10-11 08:58:03.746 INFO 1 --- org.mongodb.driver.cluster : No server chosen by ReadPreferenceServerSelector{readPreference=primary} from cluster description ClusterDescription{type=REPLICA_SET, connectionMode=MULTIPLE, serverDescriptions=[ServerDescription{address=
zlpv9352.abc.com:18720, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}, ServerDescription{address=
zlpv9353.abc.com:18720, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}, ServerDescription{address=
zlpv9420.abc.com:18720, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[4, 0, 3]}, minWireVersion=0, maxWireVersion=7, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=12122243, setName='otf-rs-prod2', canonicalAddress=
zlpv9420.abc.com:18720, hosts=[
zlpv9352.abc.com:18720,
zlpv9353.abc.com:18720,
zlpv9420.abc.com:18720], passives=[], arbiters=[], primary='
zlpv9353.abc.com:18720', tagSet=TagSet{[]}, electionId=null, setVersion=5, lastWriteDate=Fri Oct 11 08:57:53 GMT 2019, lastUpdateTimeNanos=18934947630635371}]}. Waiting for 30000 ms before timing out
This causes exceptions on any read/writes to primary.
Any ideas on how to resolve this. We are using springboot & mongoclient