mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-09 02:43:55 -04:00
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:
@@ -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
|
||||
|
||||
@@ -9,6 +9,7 @@ env:
|
||||
CW_APP_NAME: api
|
||||
# required by cf run-task
|
||||
FLASK_APP: application.py
|
||||
SQLALCHEMY_POOL_SIZE: 10
|
||||
|
||||
# Credentials variables
|
||||
ADMIN_BASE_URL: null
|
||||
|
||||
Reference in New Issue
Block a user