From a92b01fe58b5a133c719f114106342e80279efb4 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Wed, 23 May 2012 11:56:10 -0400 Subject: [PATCH] Adds sql_ config settings to glance-api.conf. The Glance v2 API makes use of the DB directly. As such we should include the sql_ configs in the default glance-api.conf file. Fixes LP Bug #1003504. Change-Id: I5e287dafcd65864f56789ae22bab3dcc6b353a47 --- etc/glance-api.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/etc/glance-api.conf b/etc/glance-api.conf index 8d144744fa..5873827895 100644 --- a/etc/glance-api.conf +++ b/etc/glance-api.conf @@ -32,6 +32,20 @@ log_file = /var/log/glance/api.log # Backlog requests when creating socket backlog = 4096 +# SQLAlchemy connection string for the reference implementation +# registry server. Any valid SQLAlchemy connection string is fine. +# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine +sql_connection = sqlite:///glance.sqlite + +# Period in seconds after which SQLAlchemy should reestablish its connection +# to the database. +# +# MySQL uses a default `wait_timeout` of 8 hours, after which it will drop +# idle connections. This can result in 'MySQL Gone Away' exceptions. If you +# notice this, you can lower this value to ensure that SQLAlchemy reconnects +# before MySQL can drop the connection. +sql_idle_timeout = 3600 + # Number of Glance API worker processes to start. # On machines with more than one CPU increasing this value # may improve performance (especially if using SSL with