Skip to content

Commit

Permalink
阿里云rds强制释放空闲连接 调整pool_recycle可破
Browse files Browse the repository at this point in the history
  • Loading branch information
cevin committed Apr 16, 2019
1 parent 0182be5 commit 572b4ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions walle/config/settings_prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class ProdConfig(Config):

# 数据库设置 @TODO
SQLALCHEMY_DATABASE_URI = 'mysql://user:password@localhost:3306/walle?charset=utf8'
# 阿里云RDS强制释放空闲连接导致经常报错 mysql server has gone way
# 适当修改该参数即可 单位为秒
# N秒不用的连接自动释放
# SQLALCHEMY_POOL_RECYCLE = 30

# 本地代码检出路径(用户查询分支, 编译, 打包) #TODO
CODE_BASE = '/tmp/walle/codebase/'
Expand Down

0 comments on commit 572b4ed

Please sign in to comment.