[CSHARP-4113] Exception when max pool size greater than 1024, after update driver to version 2.15.0 Created: 28/Mar/22  Updated: 22/Jun/22  Resolved: 28/Mar/22

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: 鑫炜 廖 Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates CSHARP-4110 Remove initialCount upper bound check... Closed

 Description   

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)


Generated at Wed Feb 07 21:47:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.