Nova causes MySQL timeouts

Albert Braden Albert.Braden at synopsys.com
Wed Sep 4 17:18:43 UTC 2019


We’re not setting max_pool_size nor max_overflow option presently. I googled around and found this document:

https://docs.openstack.org/keystone/stein/configuration/config-options.html

Document says:

[api_database]
connection_recycle_time = 3600               (Integer) Timeout before idle SQL connections are reaped.
max_overflow = None                                   (Integer) If set, use this value for max_overflow with SQLAlchemy.
max_pool_size = None                                  (Integer) Maximum number of SQL connections to keep open in a pool.

[database]
connection_recycle_time = 3600               (Integer) Timeout before idle SQL connections are reaped.
min_pool_size = 1                                            (Integer) Minimum number of SQL connections to keep open in a pool.
max_overflow = 50                                          (Integer) If set, use this value for max_overflow with SQLAlchemy.
max_pool_size = None                                  (Integer) Maximum number of SQL connections to keep open in a pool.

If min_pool_size is >0, would that cause at least 1 connection to remain open until it times out? What are the recommended values for these, to allow unused connections to close before they time out? Is “min_pool_size = 0” an acceptable setting?

My settings are default:

[api_database]:
#connection_recycle_time = 3600
#max_overflow = <None>
#max_pool_size = <None>

[database]:
#connection_recycle_time = 3600
#min_pool_size = 1
#max_overflow = 50
#max_pool_size = 5

It’s not obvious what max_overflow does. Where can I find a document that explains more about these settings?

From: Gaëtan Trellu <gaetan.trellu at incloudus.com>
Sent: Tuesday, September 3, 2019 1:37 PM
To: Albert Braden <albertb at synopsys.com>
Cc: openstack-discuss at lists.openstack.org
Subject: Re: Nova causes MySQL timeouts

Hi Albert,

It is a configuration issue, have a look to max_pool_size and max_overflow options under [database] section.

Keep in mind than more workers you will have more connections will be opened on the database.

Gaetan (goldyfruit)

On Sep 3, 2019 4:31 PM, Albert Braden <Albert.Braden at synopsys.com<mailto:Albert.Braden at synopsys.com>> wrote:

It looks like nova is keeping mysql connections open until they time out. How are others responding to this issue? Do you just ignore the mysql errors, or is it possible to change configuration so that nova closes and reopens connections before they time out? Or is there a way to stop mysql from logging these aborted connections without hiding real issues?

Aborted connection 10726 to db: 'nova' user: 'nova' host: 'asdf' (Got timeout reading communication packets)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190904/97bd18c0/attachment.html>


More information about the openstack-discuss mailing list