[openstack-dev] [nova][cinder] (OperationalError) (1040, 'Too many connections') None None

Nader Lahouti nader.lahouti at gmail.com
Mon Sep 29 19:12:10 UTC 2014


Jay,

I increased the max_connection to 2000 and so far don't see any issue.
After launching 20 VMs the number of connections as follows:

Mon Sep 29 05:05:29 PDT 2014
Number of open TCP:3306 - 326
Number of open TCP:3306 nova-api - 34
Number of open TCP:3306 mysqld - 163
Number of open TCP:8774 - 66
Number of nova-api - 98

It seems the default max_connection for Juno in not enough and should be
changed as you suggested. But the question is what is correct/reliable
value?


Thanks for the help.
Nader.



On Mon, Sep 29, 2014 at 10:41 AM, Jay Pipes <jaypipes at gmail.com> wrote:

> On 09/29/2014 01:34 PM, Nader Lahouti wrote:
>
>> On Mon, Sep 29, 2014 at 9:58 AM, Jay Pipes <jaypipes at gmail.com
>> <mailto:jaypipes at gmail.com>> wrote:
>>
>>     On 09/29/2014 12:48 PM, Nader Lahouti wrote:
>>
>>         Hi Jay,
>>
>>         I login first and the recreated the problem and here is the log:
>>         http://paste.openstack.org/__show/116776/
>>         <http://paste.openstack.org/show/116776/>
>>
>>
>>     OK. Looks like there isn't anything wrong with your setup. I'm
>>     guessing you have set up Keystone to run in Apache with 10 worker
>>     processes, and you have the workers config option setting in
>>     nova.conf, neutron.conf and all the other project configuration
>>     files set to 0, which will trigger a number of worker processes
>>     equal to the number of CPU cores on your box, which I'm guessing
>>     from looking at your SHOW FULL PROCESSLIST is around 24-32 cores.
>>
>>
>> I haven't modified the default values in *.conf files (I'm using
>> devstack for installation) for workers setting.
>> How  to check that keystone is using apache with 10 worker process?
>> And the number of CPU cores on my box is 32.
>>
>
> OK, as I suspected.
>
>      Solution: either lower the workers configuration option from 0 to
>>     something like 12, or increase the max_connections setting in your
>>     my.cnf to something that can handle the worker processes from all
>>     the OpenStack services (I'd recommend something like 2000).
>>
>>
>> Just for clarification, regarding the setting of workers option in the
>> *.conf file:
>> Fore neutron:
>> # api_workers = 0
>>
>> For nova, what option should be set?
>> I see  these options:
>> metadata_workers=None   (IntOpt)Number of workers for metadata service
>>
>
> You can keep all those options as-is (the default of 0) and just set your
> my.cnf max_connections variable to 2000.
>
>
> Best,
> -jay
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140929/9472c541/attachment.html>


More information about the OpenStack-dev mailing list