Bug 1251566 - Undercloud mariadb max_connection default is too low
Summary: Undercloud mariadb max_connection default is too low
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: y1
: 7.0 (Kilo)
Assignee: James Slagle
QA Contact: Marius Cornea
URL:
Whiteboard:
: 1263552 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-07 18:26 UTC by jliberma@redhat.com
Modified: 2023-02-22 23:02 UTC (History)
9 users (show)

Fixed In Version: instack-undercloud-2.1.2-24.el7ost
Doc Type: Bug Fix
Doc Text:
The director's database (MariaDB) only accept a maximum of 1024 connections. An Undercloud with a high number of CPU cores (typically 24 or more) exhausted these database connections due to the number of OpenStack API workers spawned. This fix configures the Undercloud to accept 4096 connections for MariaDB. All services now connect to MariaDB when needed.
Clone Of:
Environment:
Last Closed: 2015-10-08 12:16:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gerrithub.io 244187 0 None None None Never
Red Hat Product Errata RHSA-2015:1862 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Linux OpenStack Platform 7 director update 2015-10-08 16:05:50 UTC

Description jliberma@redhat.com 2015-08-07 18:26:45 UTC
Description of problem:

Related to https://bugzilla.redhat.com/show_bug.cgi?id=1247924#c13

MariaDB on undercloud controller max_connections should be based on core count or connection limits will be exceeded during large, multiple deployments.

Version-Release number of selected component (if applicable):

python-rdomanager-oscplugin-0.0.8-44.el7ost.noarch


How reproducible:


Steps to Reproduce:
1. Deploy undercloud
2. mysql -e "SHOW GLOBAL VARIABLES LIKE 'max_connections'"

Actual results:


Expected results:


Additional info: 

Workaround to change on already deployed undercloud:

[root@rhos0 ~]# mysql -e "SHOW STATUS WHERE variable_name = 'Threads_connected'"
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| Threads_connected | 519   |
+-------------------+-------+

[root@rhos0 ~]# mysql -e "SET GLOBAL max_connections = 4096"

[root@rhos0 ~]# mysql -e "SHOW GLOBAL VARIABLES LIKE 'max_connections'"
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 4096  |
+-----------------+-------+

Workaround to change for restarts and boot:

[root@rhos0 ~]# sed -i 's/max_connections =.*$/max_connections = 4096/' /etc/my.cnf.d/server.cnf 

[root@rhos0 ~]# grep max_connections /etc/my.cnf.d/server.cnf 
max_connections = 4096

NOTE: Normally HAproxy max_conn should be greater than or equal to MariaDB max_connections, but no HAproxy on undercloud so max_conn does not need to be adjusted.

Comment 4 Marius Cornea 2015-09-07 14:25:08 UTC
[stack@instack ~]$ rpm -qa | grep instack-undercloud
instack-undercloud-2.1.2-25.el7ost.noarch
[stack@instack ~]$ mysql -e "SHOW GLOBAL VARIABLES LIKE 'max_connections'"
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 4096  |
+-----------------+-------+

Comment 5 chris alfonso 2015-09-17 16:44:14 UTC
*** Bug 1263552 has been marked as a duplicate of this bug. ***

Comment 7 errata-xmlrpc 2015-10-08 12:16:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1862


Note You need to log in before you can comment on or make changes to this bug.