Hi @Francesco_Virga - Welcome to the community!
We are finding that our application can maintain a connection to our Atlas cluster while it autoscales, but if we try to restart our application then it fails to connect.
According to the Cluster autoscaling docs: “Auto-scaling works on a rolling basis, meaning the process doesn’t incur any downtime.” but this does not seem to be the case for us.
Can you confirm if only during auto-scale of the Atlas cluster, your application is still able to connect as per normal and that the disconnection and server selection errors only occur when both the Atlas cluster is auto-scaling and new pods are created.
After this clarification, could you also provide the following details / information:
- Connection string including any options being used (Please redact any sensitive information / credentials)
- Driver being used
- Driver version being used
- If you have tried connecting from a non-containerised environment during auto-scale to see if the disconnection errors occur as well
Is it possible that by appending -pri
to the cluster name, we are only connecting to the primary node, which will then see downtime when its spun down? I noticed that we can remove the -pri
and still connect to the DB.
I would recommend going over the details in this post here and let me know if you have any further questions regarding the additional -pri
in the connection string. However, in short, the -pri
that you see in the connection string is not associated with the primary node directly. You may find the information on the Private Connection Strings page useful as well.
Regards,
Jason