Fix python monasca-api mysql server connection loss
This patch is a fix for MySQL connection timeouts that ocasionally occurs on the python monasca-api after not being used for about 8 hours. Reference for the change: http://docs.sqlalchemy.org/en/rel_0_9/core/pooling.html#pool-setting-recycle Change-Id: I8186718aead27f7966e3c35dbd0f490884419955
This commit is contained in:
parent
afeac3a3e8
commit
2f69bf0151
@ -50,7 +50,7 @@ class SQLRepository(object):
|
||||
url = URL(**database_conf)
|
||||
|
||||
from sqlalchemy import create_engine
|
||||
self._db_engine = create_engine(url)
|
||||
self._db_engine = create_engine(url, pool_recycle=3600)
|
||||
|
||||
self.metadata = MetaData()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user