[openstack-dev] [nova] Mysql db connection leaking?
sean at dague.net
Thu Apr 16 13:54:53 UTC 2015
On 04/16/2015 05:20 PM, Qiming Teng wrote:
> Wondering if there is something misconfigured in my devstack
> environment, which was reinstalled on RHEL7 about 10 days ago.
> I'm often running into mysql connections problem as shown below:
> $ mysql
> ERROR 1040 (HY000): Too many connections
> When I try dump the mysql connection list, I'm getting the followng
> result after a 'systemctl restart mariadb.service':
> $ mysqladmin processlist | grep nova | wc -l
> Most of the connections are at Sleep status:
> $ mysqladmin processlist | grep nova | grep Sleep | wc -l
> As for the workload, I'm currently only running two VMs in a multi-host
> devstack environment.
> So, my questions:
> - Why do we have so many mysql connections from nova?
> - Is it possible this is caused some misconfigurations?
> - 125 connections in such a toy setup is insane, any hints on nailing
> down the connections to the responsible nova components?
No, that's about right. It's 1 connection per worker. By default most
daemons start 1 worker per processor. Each OpenStack service has a bunch
of daemons. It all adds up pretty quick.
More information about the OpenStack-dev