[Openstack-operators] Too many connections
Clint Byrum
clint at fewbar.com
Mon May 30 21:31:29 UTC 2016
Excerpts from Kris G. Lindgren's message of 2016-05-30 15:33:49 +0000:
> You are most likely running db pools with a number of worker processes. If you look at the MySQL connections most of them will be idle. If that's the case set the db pool timeout lower. Lower the pool size down. Each worker thread opens a connection pool to the database. If you are running 10 workers with a min db pool size of 5 and a max of 10. You will have a minimum number of 50 db connections, max 100, per server running that service.
>
>
> I would be looking at: pool_timeout, min_pool_size, max_pool_size
>
> http://docs.openstack.org/developer/oslo.db/opts.html
>
This is great information Kris.
It's also worth noting that MySQL connections that are idle eat up very
little RAM and so you can probably bump it up a bit.
The setting for that is max_connections:
https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_max_connections
The default of 151 is pretty conservative. You can probably safely raise
it to 400 on anything but the most memory constrained MySQL server.
>
> On May 30, 2016, at 9:24 AM, Fran Barrera <franbarrera6 at gmail.com<mailto:franbarrera6 at gmail.com>> wrote:
>
> Hi,
>
> I'm using Mitaka on ubuntu 16.04 and I have many problems in horizon. I can see this in the logs of all components: "OperationalError: (pymysql.err.OperationalError) (1040, u'Too many connections')" If I increase the max_connections on mysql works well a few minutes but the same error. Maybe Openstack don't close connections with Mysql. The version of Mysql is 5.7.
>
> Any suggestions?
>
> Regards,
> Fran
More information about the OpenStack-operators
mailing list