Comment 2 for bug 1549516

Revision history for this message
Mike Bayer (zzzeek) wrote :

both nova and keystone are moving towards the modernized "enginefacade" which should reduce the number of individual connection pool uses. right now everytime nova does get_session(), we get another one of these connects. with modern enginefacade the connects would all be shared. Not sure if the nova being used here is the one with that new API yet.

longer term, it is possible to just do away with the "SELECT 1" - Openstack uses this "pessimistic" approach across the board but I think it largely is to mitigate lots of "cant connect" issues that are due to mis-configured HAProxy setups (for a long time people had HAProxy setups with a 90s timeout, should be 90m for pooled connections) as well as the excessive greenlet issue described at http://lists.openstack.org/pipermail/openstack-dev/2015-December/082717.html.

However without the pessimistic approach, it means if a single MySQL db is restarted, all openstack services would report an error when they are hit with some connections in the pool, which would then resolve on the next access. unless all methods everywhere were wrapped in a retry loop.