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

Getting timeout error when using driver in WinForms .net core 3.1 project

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.11.1
    • Affects Version/s: 2.11.0
    • Component/s: Connectivity
    • None
    • Environment:
      Windows 10 v1709
      Visual Studio 2019
      .NET Core 3.1

      I'm getting this error when I try to do a simple query. I've tested older versions of the driver like 2.10.4 and 2.10.0 and it works fine.

       

      Query

       var connStr = "mongodb://localhost:27029/?readPreference=primary";
       MongoClient client = new MongoClient(connStr);
       IMongoDatabase db = client.GetDatabase("COVID19_Clearance");
       var users = db.GetCollection<dynamic>("User").Find(new BsonDocument()).ToList();

      Error

      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: "Automatic",
       Type: "Unknown",
       State: "Disconnected",
       Servers: [{
       ServerId: "{ ClusterId : 1, EndPoint : " 127.0.0.1: 27029 " }",
       EndPoint: "127.0.0.1:27029",
       ReasonChanged: "ServerInitialDescription",
       State: "Disconnected",
       ServerVersion: ,
       TopologyVersion: ,
       Type: "Unknown",
       LastHeartbeatTimestamp: null,
       LastUpdateTimestamp: "2020-08-11T20:16:18.1181398Z"
       }
       ]
      }

            Assignee:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Reporter:
            donnyv@gmail.com Donny V
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: