From 6e7d727b40ed3a4b18940fa7f1fadb5ac59d27bc Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Wed, 25 Jun 2025 17:33:07 +0700 Subject: [PATCH] update pool sesuai rekomendasi --- knexfile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/knexfile.js b/knexfile.js index 073fe9c..ec062da 100644 --- a/knexfile.js +++ b/knexfile.js @@ -97,7 +97,10 @@ module.exports = { // connection: process.env.DB_URL, pool: { min: 2, - max: 20, + max: 100, + idleTimeoutMillis: 30000, // ← Contoh: 30 detik idle timeout + acquireTimeoutMillis: 20000, // Maksimal waktu tunggu koneksi dari pool + maxLifetimeMillis: 300000 // maksimal umur koneksi: 5 menit (300.000 ms) }, migrations: { directory: './infrastructure/database/migrations',