Set pool_recycle and pool_size to maybe fix database errors
This commit is contained in:
parent
9fa123489a
commit
1f31311b4e
@ -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 = [
|
||||||
|
Loading…
Reference in New Issue
Block a user