MySQL Connection Timeout

asked 2011-10-23 19:52:54 -0600

kcarlson-4 gravatar image

When launching nova-compute service, connection to mysql times out. (The compute node is separate from the node running mysql)

In slow network situations, it seems that the default timeout in, line 18 (5 sec) is too low. If the default is changed to 10, the connection succeeds (in my situation).

With that said, i'm not sure this is configurable.

So, my question is, can the mysql connection timeout be configured in nova.conf? (I tried sql_idle_timeout with no affect)

Trace: 2011-10-23 21:34:37,784 INFO nova.db.sqlalchemy [-] Using mysql/eventlet db_pool. 2011-10-23 21:34:42,791 CRITICAL nova [-] (nova): TRACE: Traceback (most recent call last): (nova): TRACE: File "/usr/bin/nova-compute", line 49, in <module> (nova): TRACE: service.wait() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/", line 357, in wait (nova): TRACE: _launcher.wait() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/", line 107, in wait (nova): TRACE: service.wait() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 166, in wait (nova): TRACE: return self._exit_event.wait() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 116, in wait (nova): TRACE: return hubs.get_hub().switch() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/hubs/", line 177, in switch (nova): TRACE: return self.greenlet.switch() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 192, in main (nova): TRACE: result = function(args, *kwargs) (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/", line 77, in run_server (nova): TRACE: server.start() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/", line 137, in start (nova): TRACE: self.manager.init_host() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/", line 159, in init_host (nova): TRACE: instances = self.db.instance_get_all_by_host(context, (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/db/", line 536, in instance_get_all_by_host (nova): TRACE: return IMPL.instance_get_all_by_host(context, host) (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/", line 101, in wrapper (nova): TRACE: return f(args, *kwargs) (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/", line 1392, in instance_get_all_by_host (nova): TRACE: session = get_session() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/", line 53, in get_session (nova): TRACE: _ENGINE = get_engine() (nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/", line 87, in get_engine (nova): TRACE: creator = eventlet.db_pool.ConnectionPool(MySQLdb, *pool_args) (nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 50, in __init__ (nova): TRACE: order_as_stack=True) (nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 108, in __init__ (nova): TRACE: self.free_items.append(self.create()) (nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 246, in create (nova): TRACE: *self._kwargs) (nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/", line 253, in connect ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2011-10-24 10:12:51 -0600

Could you paste the output of the commands listed below? $ cat /etc/resolv.conf $ dig | grep Query

My team leader has solved a problem like this by using a much faster DNS.

edit flag offensive delete link more

answered 2011-10-24 11:20:17 -0600

$ cat /etc/resolv.conf nameserver search

$ dig | grep Query ;; Query time: 34 msec

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2011-10-23 19:52:54 -0600

Seen: 261 times

Last updated: Oct 24 '11