Skip to content

Commit

Permalink
fix: #65 sequelize pool for mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyi committed Jul 12, 2023
1 parent 45cf6e4 commit edc71f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions app/middleware/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ module.exports = async function httpproxy(ctx, next) {
pathRewrite:{
[`^/proxy/${serverId}`]:''
},
timeout: 33000,
proxyTimeout: 36000,
changeOrigin: true
}))(ctx,next)
}
Expand Down
8 changes: 4 additions & 4 deletions config/config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ module.exports = () => {
password: password || '',
// 设置连接池
pool: {
max: 10, //最大连接个数
min: 0,
acquire: 30000, // 从连接池获取连接的最长等待时间(毫秒)
idle: 10000 // 连接池中空闲连接的最长存活时间(毫秒)
max: 140, //最大连接个数
min: 50,
acquire: 40000, // 从连接池获取连接的最长等待时间(毫秒)
idle: 15000 // 连接池中空闲连接的最长存活时间(毫秒)
}
}
]
Expand Down

0 comments on commit edc71f4

Please sign in to comment.