Increase DB connection pool size to 10

This is to address some errors we saw yesterday such as:

`sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10
reached, connection timed out, timeout 30`

Related flask-sqlalchemy docs:
http://flask-sqlalchemy.pocoo.org/2.3/config/#configuration-keys
This commit is contained in:
Athanasios Voutsadakis
2018-02-21 15:44:03 +00:00
parent f248234cfc
commit dc19e644a6
2 changed files with 2 additions and 0 deletions

View File

@@ -127,6 +127,7 @@ class Config(object):
SQLALCHEMY_COMMIT_ON_TEARDOWN = False
SQLALCHEMY_RECORD_QUERIES = True
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_POOL_SIZE = os.environ.get('SQLALCHEMY_POOL_SIZE', 5)
SQLALCHEMY_POOL_TIMEOUT = 30
SQLALCHEMY_POOL_RECYCLE = 300
PAGE_SIZE = 50