Set pool_recycle and pool_size to maybe fix database errors

This commit is contained in:
Administrator 2022-03-21 10:30:27 +01:00
parent 9fa123489a
commit 1f31311b4e

View File

@ -21,6 +21,10 @@ class ConfigClass(object):
(os.getenv("MYSQL_PORT") or str(3306)) + "/" + \ (os.getenv("MYSQL_PORT") or str(3306)) + "/" + \
os.getenv('MYSQL_DATABASE') os.getenv('MYSQL_DATABASE')
SQLALCHEMY_TRACK_MODIFICATIONS = False # Avoids SQLAlchemy warning SQLALCHEMY_TRACK_MODIFICATIONS = False # Avoids SQLAlchemy warning
SQLALCHEMY_ENGINE_OPTIONS = {
'pool_size': 100,
'pool_recycle': 240 # 4 minutes
}
# openapi/Swagger config # openapi/Swagger config
SERVERS = [ SERVERS = [