diff options
author | Andrew Morrow <acm@mongodb.com> | 2017-08-08 15:52:43 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2017-08-09 18:20:19 -0400 |
commit | 99c6768bf6931114657e108bd9f3ea96e3577c10 (patch) | |
tree | 78ed094559c1c793c8f05f9e811bd757dd718531 /src/mongo/s/sharding_initialization.cpp | |
parent | 4ce108f7cf1663a0cad351cd9d0d684c1c49af35 (diff) | |
download | mongo-99c6768bf6931114657e108bd9f3ea96e3577c10.tar.gz |
SERVER-29429 Pick a small but reasonable default for max pending connections
Diffstat (limited to 'src/mongo/s/sharding_initialization.cpp')
-rw-r--r-- | src/mongo/s/sharding_initialization.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/s/sharding_initialization.cpp b/src/mongo/s/sharding_initialization.cpp index 60fcd383df4..31388f24656 100644 --- a/src/mongo/s/sharding_initialization.cpp +++ b/src/mongo/s/sharding_initialization.cpp @@ -80,7 +80,14 @@ MONGO_EXPORT_STARTUP_SERVER_PARAMETER(ShardingTaskExecutorPoolHostTimeoutMS, int, ConnectionPool::kDefaultHostTimeout.count()); MONGO_EXPORT_STARTUP_SERVER_PARAMETER(ShardingTaskExecutorPoolMaxSize, int, -1); -MONGO_EXPORT_STARTUP_SERVER_PARAMETER(ShardingTaskExecutorPoolMaxConnecting, int, -1); + +// By default, limit us to two concurrent pending connection attempts +// in any one pool. Since pools are currently per-cpu, we still may +// have something like 64 concurrent total connection attempts on a +// modestly sized system. We could set it to one, but that seems too +// restrictive. +MONGO_EXPORT_STARTUP_SERVER_PARAMETER(ShardingTaskExecutorPoolMaxConnecting, int, 2); + MONGO_EXPORT_STARTUP_SERVER_PARAMETER(ShardingTaskExecutorPoolMinSize, int, static_cast<int>(ConnectionPool::kDefaultMinConns)); |