mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-24 10:26:02 +03:00
retry if acquire error
This commit is contained in:
parent
2912ca1248
commit
b892a92fc8
1 changed files with 6 additions and 4 deletions
|
@ -40,20 +40,22 @@ class Database {
|
|||
|
||||
Dialect.prototype.destroyRawConnection = async () => { }
|
||||
|
||||
const acquireConnectionTimeout = 120 * 1000;
|
||||
|
||||
const knexInstance = knex({
|
||||
client: Dialect,
|
||||
connection: { }, // Do not remove, Leave it empty is ok
|
||||
useNullAsDefault: true,
|
||||
acquireConnectionTimeout: acquireConnectionTimeout,
|
||||
pool: {
|
||||
min: 1,
|
||||
max: 1,
|
||||
idleTimeoutMillis: 30000,
|
||||
idleTimeoutMillis: 120 * 1000,
|
||||
propagateCreateError: false,
|
||||
acquireTimeoutMillis: acquireConnectionTimeout,
|
||||
}
|
||||
});
|
||||
|
||||
console.log( knexInstance.pool)
|
||||
console.log("pool size")
|
||||
|
||||
R.setup(knexInstance);
|
||||
|
||||
if (process.env.SQL_LOG === "1") {
|
||||
|
|
Loading…
Reference in a new issue