From d594f62fd99623ee26134fa132bbb739d9e9de1c Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Sat, 2 Jul 2016 00:00:15 -0700 Subject: Set max pool size default to 5 The max_pool_size defaults to 5 instead of None. Setting this option to 0 effective disables an upper limit to the pool. Change-Id: I9a6918e1a808e9e70105d5b21d901bbe3d298f34 --- oslo_db/options.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/oslo_db/options.py b/oslo_db/options.py index 89f4cf7..4ec1a33 100644 --- a/oslo_db/options.py +++ b/oslo_db/options.py @@ -69,12 +69,13 @@ database_opts = [ help='Minimum number of SQL connections to keep open in a ' 'pool.'), cfg.IntOpt('max_pool_size', + default=5, deprecated_opts=[cfg.DeprecatedOpt('sql_max_pool_size', group='DEFAULT'), cfg.DeprecatedOpt('sql_max_pool_size', group='DATABASE')], help='Maximum number of SQL connections to keep open in a ' - 'pool.'), + 'pool. Setting a value of 0 indicates no limit.'), cfg.IntOpt('max_retries', default=10, deprecated_opts=[cfg.DeprecatedOpt('sql_max_retries', @@ -163,13 +164,12 @@ def set_defaults(conf, connection=None, sqlite_db=None, :type sqlite_db: str :keyword max_pool_size: maximum connections pool size. The size of the pool - to be maintained, defaults to 5, will be used if value of the parameter is - `None`. This is the largest number of connections that will be kept - persistently in the pool. Note that the pool begins with no connections; - once this number of connections is requested, that number of connections - will remain. + to be maintained, defaults to 5. This is the largest number of connections + that will be kept persistently in the pool. Note that the pool begins with + no connections; once this number of connections is requested, that number + of connections will remain. :type max_pool_size: int - :default max_pool_size: None + :default max_pool_size: 5 :keyword max_overflow: The maximum overflow size of the pool. When the number of checked-out connections reaches the size set in pool_size, -- cgit v1.2.1