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

Exception when max pool size greater than 1024, after update driver to version 2.15.0

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Summary

      When maxPoolSize in connectionString greater than 1024, exeption throws.

       

      Additional Background

      System.ArgumentOutOfRangeException: Value is not between 0 and 1024: 5000. (Parameter 'initialCount')    at MongoDB.Driver.Core.Misc.Ensure.IsBetween[T](T value, T min, T max, String paramName)    at MongoDB.Driver.Core.Misc.SemaphoreSlimSignalable..ctor(Int32 initialCount)    at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool..ctor(ServerId serverId, EndPoint endPoint, ConnectionPoolSettings settings, IConnectionFactory connectionFactory, IEventSubscriber eventSubscriber, IConnectionExceptionHandler connectionExceptionHandler)    at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPoolFactory.CreateConnectionPool(ServerId serverId, EndPoint endPoint, IConnectionExceptionHandler connectionExceptionHandler)    at MongoDB.Driver.Core.Servers.Server..ctor(ClusterId clusterId, IClusterClock clusterClock, ClusterConnectionMode clusterConnectionMode, ConnectionModeSwitch connectionModeSwitch, Nullable`1 directConnection, ServerSettings settings, EndPoint endPoint, IConnectionPoolFactory connectionPoolFactory, IEventSubscriber eventSubscriber, ServerApi serverApi)    at MongoDB.Driver.Core.Servers.DefaultServer..ctor(ClusterId clusterId, IClusterClock clusterClock, ClusterConnectionMode clusterConnectionMode, ConnectionModeSwitch connectionModeSwitch, Nullable`1 directConnection, ServerSettings settings, EndPoint endPoint, IConnectionPoolFactory connectionPoolFactory, IServerMonitorFactory monitorFactory, IEventSubscriber eventSubscriber, ServerApi serverApi)    at MongoDB.Driver.Core.Servers.ServerFactory.CreateServer(ClusterType clusterType, ClusterId clusterId, IClusterClock clusterClock, EndPoint endPoint)    at MongoDB.Driver.Core.Clusters.SingleServerCluster.Initialize()    at MongoDB.Driver.ClusterRegistry.CreateCluster(ClusterKey clusterKey)    at MongoDB.Driver.ClusterRegistry.GetOrCreateCluster(ClusterKey clusterKey)    at MongoDB.Driver.MongoClient..ctor(MongoClientSettings settings)    at MongoDB.Driver.MongoClient..ctor(String connectionString)    at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.<>c__DisplayClass0_0.<AddMongoDBClient>b__0(IServiceProvider c)
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            cometliao@gmail.com 鑫炜 廖
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: