Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2540

A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.7.3
    • Component/s: Connectivity
    • Labels:
      None
    • Environment:
      Azure

      Hi, 

      I have a docker containerized .Net core web API application running in AKS which connects to Azure cosmos db using Mondb .net driver to perform CRUD operations.

      I don't face any issues running locally, but in the AKS cluster MongoDB client throws System.TimeoutException frequently and it gets resolved only after restarting the Pod.

      MongoDb .Net driver Version: 2.7.3(latest)

      MongoClient is registered as a singleton service and enabled Ssl as well.

      Please find the exception below and let me know how to resolve this as early as possible. Its creating issues and am unable to predict the root cause as it occurs only in the azure cluster.

      Suggest any workarounds if possible.

      Thanks in advance!

      "ClassName": "System.TimeoutException",
       "Message": "A timeout occured after 30000ms selecting a server using CompositeServerSelector\{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is \{ ClusterId : \"1\", ConnectionMode : \"ReplicaSet\", Type : \"ReplicaSet\", State : \"Disconnected\", Servers : [{ ServerId: \"{ ClusterId : 1, EndPoint : \"Unspecified/cdb-ms-prod-eastus1-fd18.documents.azure.com:10255\" }\", EndPoint: \"Unspecified/cdb-ms-prod-eastus1-fd18.documents.azure.com:10255\", State: \"Disconnected\", Type: \"Unknown\" }] }.",
       "Data": null,
       "InnerException": null,
       "HelpURL": null,
       "StackTraceString": " at MongoDB.Driver.Core.Clusters.Cluster.ThrowTimeoutException(IServerSelector selector, ClusterDescription description)\n at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedHelper.HandleCompletedTask(Task completedTask)\n at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedAsync(IServerSelector selector, ClusterDescription description, Task descriptionChangedTask, TimeSpan timeout, CancellationToken cancellationToken)\n at MongoDB.Driver.Core.Clusters.Cluster.SelectServerAsync(IServerSelector selector, CancellationToken cancellationToken)\n at MongoDB.Driver.MongoClient.AreSessionsSupportedAfterSeverSelctionAsync(CancellationToken cancellationToken)\n at MongoDB.Driver.MongoClient.AreSessionsSupportedAsync(CancellationToken cancellationToken)\n at MongoDB.Driver.MongoClient.StartImplicitSessionAsync(CancellationToken cancellationToken)\n at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSessionAsync[TResult](Func`2 funcAsync, CancellationToken cancellationToken)
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            santy santhosh K
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: