Skip to content

Commit ff2fcc2

Browse files
committed
fix: db connection pool
1 parent e32c79c commit ff2fcc2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/knexfile.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ const knexConfig: Config = {
2525
directory: join(__dirname, 'migrations')
2626
},
2727
pool: {
28+
min: 1,
29+
max: client === 'sqlite' ? 2 : 4,
30+
acquireTimeoutMillis: 1000 * 5 * 60, // timeout 5 minutes
2831
afterCreate: (conn, done) => {
2932
if (client === 'sqlite') {
3033
conn.run('PRAGMA foreign_keys = ON;', function (err) {

0 commit comments

Comments
 (0)