Nova sqlalchemy mysql db connection timeout causes a 500 error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Ryan Lucio |
Bug Description
Version: Austin
Deployment: multi-machine, 1 controller (api/network/
Detail: Tests using the ec2 api run fine all day, but then first thing the next morning we always get a 500 on the first test. The error logging is captured below. A quick search on the SQLAlchemy site shows documentation identifying one likely cause for the issue. See http://
Output of nova-api.log
nova-api(
nova-api(
nova-api(
nova-api(root): INFO Looking up user: 'e6e82914-
Stack trace (returned in the ec2 api response):
GET http://
File "/usr/lib/
result = self.applicatio
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
response = self.app(environ, start_response)
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/
return self.func(req, *args, **kwargs)
File "/usr/lib/
req.path)
File "/usr/lib/
user = self.get_
File "/usr/lib/
user_dict = drv.get_
File "/usr/lib/
return self._db_
File "/usr/lib/
return IMPL.user_
File "/usr/lib/
return f(*args, **kwargs)
File "/usr/lib/
).filter_
File "/usr/lib/
ret = list(self[0:1])
File "/usr/lib/
return list(res)
File "/usr/lib/
return self._execute_
File "/usr/lib/
mapper=
File "/usr/lib/
clause, params or {})
File "/usr/lib/
params)
File "/usr/lib/
return self.__
File "/usr/lib/
context.
File "/usr/lib/
context)
File "/usr/lib/
context)
File "/usr/lib/
cursor.
File "/usr/lib/
self.
File "/usr/lib/
raise errorclass, errorvalue
OperationalError: (OperationalError) (2006, 'MySQL server has gone away') 'SELECT users.created_at AS users_created_at, users.updated_at AS users_updated_at, users.deleted_at AS users_deleted_at, users.deleted AS users_deleted, users.id AS users_id, users.name AS users_name, users.access_key AS users_access_key, users.secret_key AS users_secret_key, users.is_admin AS users_is_admin \nFROM users \nWHERE users.access_key = %s AND users.deleted = %s \n LIMIT 0, 1' ('e6e82914-
) returned from server}
Related branches
- Eric Day: Pending requested
- Devin Carlen: Pending requested
-
Diff: 28 lines (+6/-1)2 files modifiednova/db/sqlalchemy/session.py (+3/-1)
nova/flags.py (+3/-0)
Changed in nova: | |
assignee: | nobody → Ryan Lucio (rlucio) |
tags: | added: austin |
Changed in nova: | |
status: | Triaged → In Progress |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → 2011.1 |
status: | Fix Committed → Fix Released |
I guess Bexar is also affected by this, given that we don't pass pool_recycle= to create_engine.
@Ryan: I see you assigned yourself, are you working on this ? If yes, please set bug to "In progress". If not, please unassign yourself to give someone else a chance to fix it.