Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

spend 17 minutes for 'Lost connect to MySQL server during query'

Hello ,

We're using glance 2012.1+stable~20120608-5462295-0ubuntu2.2. We got a info as 'Lost connect to MySQL server during query' and glance spend 17 minutes to wait the response. is there any solution for shortened time? The following section is error message. Thanks.

-- Error Message:

2013-04-08 10:52:19 24193 DEBUG [routes.middleware] Match dict: {'action': u'show', 'controller': <glance.common.wsgi.resource object="" at="" 0x2f5dd10="">, 'id': u'test'}

2013-04-08 11:09:57 24193 WARNING [glance.registry.db.api] Got mysql server has gone away: (2013, 'Lost connection to MySQL server during query')

2013-04-08 11:09:57 24193 DEBUG [eventlet.wsgi.server] Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 382, in handle_one_response result = self.application(self.environ, start_response)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func return self.func(req, args, *kwargs)

File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 279, in __call__ response = req.get_response(self.application)

File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1086, in get_response application, catch_exc_info=False)

File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1055, in call_application app_iter = application(self.environ, start_response)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__ return resp(environ, start_response)

File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, in __call__ response = self.app(environ, start_response)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__ return resp(environ, start_response)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func return self.func(req, args, *kwargs)

File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 477, in __call__ request, **action_args)

File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 494, in dispatch return method(args, *kwargs)

File "/usr/lib/python2.7/dist-packages/glance/registry/api/v1/images.py", line 274, in show image = db_api.image_get(req.context, id)

File "/usr/lib/python2.7/dist-packages/glance/registry/db/api.py", line 287, in image_get image = query.one()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2184, in one ret = list(self)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2227, in __iter__ return self._execute_and_instances(context)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2240, in _execute_and_instances close_with_result=True)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2231, in _connection_from_session **kw)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 730, in connection close_with_result=close_with_result)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 736, in _connection_for_bind return engine.contextual_connect(**kwargs)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2490, in contextual_connect self.pool.connect(),

File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 224, in connect return _ConnectionFairy(self).checkout()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 466, in checkout self.connection = self._connection_record.get_connection()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 300, in get_connection self.connection = self.__connect()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 330, in __connect connection = self.__pool._creator()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 80, in connect return dialect.connect(cargs, *cparams)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 281, in connect return self.dbapi.connect(cargs, *cparams)

File "/usr/lib/pymodules/python2.7/MySQLdb/__init__.py", line 81, in Connect return Connection(args, *kwargs)

File "/usr/lib/pymodules/python2.7/MySQLdb/connections.py", line 187, in __init__ super(Connection, self).__init__(args, *kwargs2) OperationalError: (OperationalError) (2003, "Can't connect to MySQL server on '172.16.10.33' (101)") None None

2013-04-08 11:09:57 24193 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [08/Apr/2013 11:09:57] "GET /images/test HTTP/1.1" 500 4192 1057.706163

Why Glance spend 17 minutes for 'Lost connect a long time connecting to MySQL server during query'MySQL?

Hello ,

We're using glance 2012.1+stable~20120608-5462295-0ubuntu2.2. We got a info as 'Lost connect to MySQL server during query' and glance spend 17 minutes to wait the response. is there any solution for shortened time? The following section is error message. Thanks.

-- Error Message:

2013-04-08 10:52:19 24193 DEBUG [routes.middleware] Match dict: {'action': u'show', 'controller': <glance.common.wsgi.resource object="" at="" 0x2f5dd10="">, 'id': u'test'}

2013-04-08 11:09:57 24193 WARNING [glance.registry.db.api] Got mysql server has gone away: (2013, 'Lost connection to MySQL server during query')

2013-04-08 11:09:57 24193 DEBUG [eventlet.wsgi.server] Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 382, in handle_one_response result = self.application(self.environ, start_response)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func return self.func(req, args, *kwargs)

File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 279, in __call__ response = req.get_response(self.application)

File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1086, in get_response application, catch_exc_info=False)

File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1055, in call_application app_iter = application(self.environ, start_response)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__ return resp(environ, start_response)

File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, in __call__ response = self.app(environ, start_response)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__ return resp(environ, start_response)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs)

File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func return self.func(req, args, *kwargs)

File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 477, in __call__ request, **action_args)

File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 494, in dispatch return method(args, *kwargs)

File "/usr/lib/python2.7/dist-packages/glance/registry/api/v1/images.py", line 274, in show image = db_api.image_get(req.context, id)

File "/usr/lib/python2.7/dist-packages/glance/registry/db/api.py", line 287, in image_get image = query.one()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2184, in one ret = list(self)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2227, in __iter__ return self._execute_and_instances(context)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2240, in _execute_and_instances close_with_result=True)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2231, in _connection_from_session **kw)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 730, in connection close_with_result=close_with_result)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 736, in _connection_for_bind return engine.contextual_connect(**kwargs)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2490, in contextual_connect self.pool.connect(),

File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 224, in connect return _ConnectionFairy(self).checkout()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 466, in checkout self.connection = self._connection_record.get_connection()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 300, in get_connection self.connection = self.__connect()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 330, in __connect connection = self.__pool._creator()

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 80, in connect return dialect.connect(cargs, *cparams)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 281, in connect return self.dbapi.connect(cargs, *cparams)

File "/usr/lib/pymodules/python2.7/MySQLdb/__init__.py", line 81, in Connect return Connection(args, *kwargs)

File "/usr/lib/pymodules/python2.7/MySQLdb/connections.py", line 187, in __init__ super(Connection, self).__init__(args, *kwargs2) OperationalError: (OperationalError) (2003, "Can't connect to MySQL server on '172.16.10.33' (101)") None None

2013-04-08 11:09:57 24193 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [08/Apr/2013 11:09:57] "GET /images/test HTTP/1.1" 500 4192 1057.706163