Can not connec to MongoDB cluster while in quiesce mode

I got this error from Debezium connector that I used to connect and retrieve change events from my Mongo cluster:
com.mongodb.MongoNodeIsRecoveringException: Command failed with error 91 (ShutdownInProgress): 'The server is in quiesce mode and will shut down' on server <current_primary_shard>:<port>. This happened many times when my MongoDB cluster scaling up or down.

My question is:

  1. Is there any way to keep the connection working while the cluster is in quiesce mode?
  2. When the cluster is in a quiesce period, will the incoming event be stored or backed up?
  3. From my investigation, my connector keeps trying to connect to the replica shard that was primary before the scaling process even after the process finished, and that shard was stepped down to secondary. Will this point cause any problems when I connect to my Debezium connector since it is required to connect to the primary shard?

Ps. I found this topic with a similar issue but it seems not solved yet. So I create this topic.

1 Like