We have mongo cluster which is a 3 node
replicaset and we connect the cluster using Spring boot app. This cluster have a daily maintenance window of 20-30 sec
during which one of the node goes down and it automatically comes up post that greenzone.
We are using Mongodb java sync driver(Spring-data-mongodb) of version 4.6.1
and MongoDB cluster is having version - 5.0.14
.
In the logs, I could see it continously logs the error "Exception in monitor thread - Command failed with error 91 - The server is in Quiesce mode and will shutdown
" for around 1000 times during this period (~30 sec). And after that it automatically connects back with the log - "Monitor thread successfully connected
".
My Query is:
- How to avoid logging these many redundant exception from our app as it's difficult to monitor the useful logs
- Why the app tries to connect so frequently, is there any way to increase the retry attempt time so that it improves the logging
- In the error it says "Command failed", what exactly the command is which it tries to execute during the greenzone so frequently(
~30/sec
). It's not coming from our App as we don't have any health check monitor in built. - Does this failure counts comes under Login failure attempt?