Merge lp:~rlucio/nova/lp690314 into lp:~hudson-openstack/nova/trunk
Status: | Merged |
---|---|
Approved by: | Eric Day |
Approved revision: | 506 |
Merged at revision: | 512 |
Proposed branch: | lp:~rlucio/nova/lp690314 |
Merge into: | lp:~hudson-openstack/nova/trunk |
Diff against target: |
28 lines (+6/-1) 2 files modified
nova/db/sqlalchemy/session.py (+3/-1) nova/flags.py (+3/-0) |
To merge this branch: | bzr merge lp:~rlucio/nova/lp690314 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Eric Day | Pending | ||
Devin Carlen | Pending | ||
Review via email: mp+45064@code.launchpad.net |
This proposal supersedes a proposal from 2010-12-31.
Description of the change
Adds the pool_recycle option to the sql engine startup call. This enables connection auto-timeout so that connection pooling will work properly. The recommended setting (per sqlalchemy FAQ page) has been provided as a default for a new configuration flag. What this means is that if a db connection sits idle for the configured # of seconds, the engine will automatically close the connection and return it to the available thread pool. See Bug #690314 for info.
The fix was tested and verified on multi-node deployments of Austin and Bexar with MySQL, and it was also verified that the change does not affect sqlite users (dev environment testing only).
3600 sounds like a sane default given most databases idle connection timeout... but I don't think we should hardcode it. Adding a flag to change that default value would allow us to cover all corner cases ?