Hi,
We have a .NET 6.0 application running on Kubernetes using a MongoDB.Driver version 2.15.0. We have a Mongo Atlas M0 tier cluster which we are upgrading to M10 to get access to some of its features.
The problem is that when the upgrade happens, application cannot reconnect to M10 by its own and we have to restart a service (by deleting a K8s pod basically).
We have lots of services spread among multiple teams, so it can be cumbersome to sync all of them to restart at once + we have a downtime possibility here.
Exception message we are getting:
A timeout occurred after 30000ms selecting a server using CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{ ReadPreference = { Mode : Primary } }, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 }, OperationsCountServerSelector }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Connected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "<sensitive>" }", EndPoint: "<sensitive>", ReasonChanged: "Heartbeat", State: "Connected", ServerVersion: , TopologyVersion: { "processId" : ObjectId("<sensitive>"), "counter" : NumberLong(5) }, Type: "ReplicaSetSecondary", Tags: "{ nodeType : ELECTABLE, region : US_EAST, workloadType : OPERATIONAL, provider : AZURE }", WireVersionRange: "[0, 17]", LastHeartbeatTimestamp: "2023-03-07T10:18:46.4085885Z", LastUpdateTimestamp: "2023-03-07T10:18:46.4085892Z" }, { ServerId: "{ ClusterId : 1, EndPoint : "<sensitive>" }", EndPoint: "<sensitive>", ReasonChanged: "Heartbeat", State: "Connected", ServerVersion: , TopologyVersion: { "processId" : ObjectId("<sensitive>"), "counter" : NumberLong(4) }, Type: "ReplicaSetSecondary", Tags: "{ region : US_EAST, workloadType : OPERATIONAL, nodeType : ELECTABLE, provider : AZURE }", WireVersionRange: "[0, 17]", LastHeartbeatTimestamp: "2023-03-07T10:18:47.8866555Z", LastUpdateTimestamp: "2023-03-07T10:18:47.8866558Z" }, { ServerId: "{ ClusterId : 1, EndPoint : "<sensitive>" }", EndPoint: "<sensitive>", ReasonChanged: "ReportedPrimaryIsStale", State: "Disconnected", ServerVersion: , TopologyVersion: , Type: "Unknown", LastHeartbeatTimestamp: null, LastUpdateTimestamp: "2023-03-07T10:18:46.3312199Z" }] }.
Connection string: mongodb+srv://username:password@[database].[id].mongodb.net