No way to avoid ReplicaSetNoPrimary errors

Hey @Pyra_Metrik,

There could be various reasons behind it, a few of them could be:

  • Intermittent network outages that cause the driver to lose connectivity.
  • Re-election of the PRIMARY node in your cluster, which leads to lost connections as the topology changes.

Please refer to Test Primary Failover and Test Resilience to read more about it.

In case you need further assistance, please share the org name of your cluster, so we can look into it or you can reach out to Atlas in-app chat support.

The in-app chat support does not require any payment to use and can be found at the bottom right corner of the Atlas UI:

image

Best,
Kushagra