summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Brown <browne@vmware.com>2016-07-02 00:00:15 -0700
committerEric Brown <browne@vmware.com>2016-07-08 15:09:09 -0700
commitd594f62fd99623ee26134fa132bbb739d9e9de1c (patch)
tree9bd74dbac5c0ddbb68cd16a399a864c3422556b0
parent58d60ca5b2465c96adec36c286328b1b8b8b512f (diff)
downloadoslo-db-d594f62fd99623ee26134fa132bbb739d9e9de1c.tar.gz
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
-rw-r--r--oslo_db/options.py14
1 files 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,