summaryrefslogtreecommitdiff
path: root/oslo_db/options.py
diff options
context:
space:
mode:
authorRoman Podoliaka <rpodolyaka@mirantis.com>2016-01-18 19:03:16 +0200
committerRoman Podoliaka <rpodolyaka@mirantis.com>2016-02-24 13:49:06 +0200
commitdb5ecf69c8a13f96fbb00250a5fd3df312082b23 (patch)
treebf6cc156e775371349ab22f87d46228edc343e28 /oslo_db/options.py
parent8717f08d8ff8d99db928b7d58eeb39b6a98efb4e (diff)
downloadoslo-db-db5ecf69c8a13f96fbb00250a5fd3df312082b23.tar.gz
Increase the default max_overflow value
It turned out that distribution of WSGI requests between forks is not even when eventlet is used, which can cause pool timeout issues under load, while there are idle workers with open DB connections, which should have served these HTTP requests. The default max_overflow value should be increased to allow DB oriented services (mostly APIs) handle spikes in number of concurrent requests trying to use a DB. At the same time, the default number of greenlets is decreased: I65b40b9906b75146a0085bbe168f1e6bcae82f21 which effectively causes a particular worker to stop accepting new requests it has no resources (DB connections) to handle and allow other forks accept()'ing on the same FD to proceed. Testing was performed using this script: https://gist.github.com/zzzeek/c69138fd0d0b3e553a1f With 100 greenthreads in the pool, 50 DB connections allowed overflow no pool timeout issues were seen with up to 500 concurrent requests done by ab, while current default values (1000/10) could not handle even 100 concurrent requests. See this ML thread for details: http://lists.openstack.org/pipermail/openstack-dev/2015-December/082717.html DocImpact This change potentially increases the number of connections open to the RDBMS server. If you start seeing "too many connections" errors, please check these settings and adjust them appropriately: https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_connections http://www.postgresql.org/docs/current/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS Closes-Bug: #1535375 Change-Id: I2e9c2a71d8231e0dfbefc6293ad319e1e459beec
Diffstat (limited to 'oslo_db/options.py')
-rw-r--r--oslo_db/options.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/oslo_db/options.py b/oslo_db/options.py
index 38e9024..f4bec25 100644
--- a/oslo_db/options.py
+++ b/oslo_db/options.py
@@ -89,6 +89,7 @@ database_opts = [
group='DATABASE')],
help='Interval between retries of opening a SQL connection.'),
cfg.IntOpt('max_overflow',
+ default=50,
deprecated_opts=[cfg.DeprecatedOpt('sql_max_overflow',
group='DEFAULT'),
cfg.DeprecatedOpt('sqlalchemy_max_overflow',