Merge lp:~rlucio/nova/lp690314 into lp:~hudson-openstack/nova/trunk
Status: | Superseded |
---|---|
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 |
---|---|---|---|
Nova Core security contacts | Pending | ||
Review via email: mp+44883@code.launchpad.net |
This proposal has been superseded by 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 hardcoded. What this means is that if a db connection sits idle for an hour, the engine will automatically close the connection and return it to the available thread pool. See Bug #690314 for info.
WRT hardcoding the timeout, there is no indication (based on what I read) that there is any reason to use a different value. It was suggested by another dev that we should hard code 1800 but I am not aware of any advantage in that value.
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 ?