When the internal VIP is moved in the event of a failure of the active
controller, OpenStack services can become unresponsive as they try to
talk with MariaDB using connections from the SQLAlchemy pool.
It has been argued that OpenStack doesn't really need to use connection
pooling with MariaDB [1]. This commit reduces the use of connection
pooling via two configuration options:
- max_pool_size is set to 1 to allow only a single connection in the
pool (it is not possible to disable connection pooling entirely via
oslo.db, and max_pool_size = 0 means unlimited pool size)
- lower connection_recycle_time from the default of one hour to 10
seconds, which means the single connection in the pool will be
recreated regularly
These settings have shown better reactivity of the system in the event
of a failover.
Reviewed: https:/ /review. opendev. org/754929 /git.openstack. org/cgit/ openstack/ kolla-ansible/ commit/ ?id=903efc5a988 0eee960f131f795 4ec568e6f60df1
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 903efc5a9880eee 960f131f7954ec5 68e6f60df1
Author: Pierre Riteau <email address hidden>
Date: Tue Sep 22 17:52:36 2020 +0200
Reduce the use of SQLAlchemy connection pooling
When the internal VIP is moved in the event of a failure of the active
controller, OpenStack services can become unresponsive as they try to
talk with MariaDB using connections from the SQLAlchemy pool.
It has been argued that OpenStack doesn't really need to use connection
pooling with MariaDB [1]. This commit reduces the use of connection
pooling via two configuration options:
- max_pool_size is set to 1 to allow only a single connection in the recycle_ time from the default of one hour to 10
pool (it is not possible to disable connection pooling entirely via
oslo.db, and max_pool_size = 0 means unlimited pool size)
- lower connection_
seconds, which means the single connection in the pool will be
recreated regularly
These settings have shown better reactivity of the system in the event
of a failover.
[1] http:// lists.openstack .org/pipermail/ openstack- dev/2015- April/061808. html
Change-Id: Ib6a62d4428db9b 955693140840904 72870417f3d 564cfddb2964539 0ae378498f)
Closes-Bug: #1896635
(cherry picked from commit c81772024c70b84