-
Type: Question
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.0.0
-
Component/s: Reactive Streams
-
None
I would like to get a confirmation and explanation of the root cause of this error below
The Error from mongo :
1. Mongo Socket Error when Write
Something went wrong org.springframework.dao.DataAccessResourceFailureException: Exception sending message; nested exception is }}com.mongodb.MongoSocketWriteException{{{}: Exception sending message at {}
-------------------------------------------------------------------
2. Mongo Socket Error when Read
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
-------------------------------------------------------------------
3. Follow by no Server chosen
org.mongodb.driver.cluster : No server chosen by com.mongodb.reactivestreams.client.internal.ClientSessionHelper$$Lambda$0000/0x0000000840bf7440@3fcda9a9 from cluster description ClusterDescription{type=REPLICA_SET, connectionMode=MULTIPLE, serverDescriptions=[ServerDescription{address=xxx-dev-xxx-documentdb-0.xxxxxx-xxxxxx.docdb.amazonaws.com:27000, type=UNKNOWN, state=CONNECTING, exception=
{com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {io.netty.channel.StacklessClosedChannelException}}]}. Waiting for 30000 ms before timing out
Is the root cause can be put as consumption below? and Solution to putting maxIdleTime is correct?
Root caused :
When the connection is idle for a period of time, the connection is closed due to firewall or load balancing, and the client does not know that, when the client continues to use this closed connection for reading and writing, an error will occur.
If the root cause and solution correct? Is there another way we can see that the connection is lost? In the log, I only see the connection is Open