Fix MySQL has gone away
This commit is contained in:
parent
d925f21b01
commit
6b7b45c18d
@ -29,6 +29,7 @@ app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://%s:%s@%s/%s?charset=utf
|
|||||||
db_user, db_password, db_host, db_name
|
db_user, db_password, db_host, db_name
|
||||||
)
|
)
|
||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
|
||||||
|
app.config['SQLALCHEMY_ENGINE_OPTIONS'] = {'pool_recycle': 200}
|
||||||
app.config['SQLALCHEMY_ECHO'] = IS_DEBUG
|
app.config['SQLALCHEMY_ECHO'] = IS_DEBUG
|
||||||
auth = HTTPBasicAuth()
|
auth = HTTPBasicAuth()
|
||||||
db = SQLAlchemy(app)
|
db = SQLAlchemy(app)
|
||||||
|
Reference in New Issue
Block a user