From 47f4f2670d188fcc358560037bfdbef3df863214 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Wed, 29 Oct 2025 17:36:37 +0700 Subject: [PATCH] [core] NOWEB - sqlite3 increase timeouts --- src/core/storage/LocalStoreCore.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/storage/LocalStoreCore.ts b/src/core/storage/LocalStoreCore.ts index f7cbda5a..187297ef 100644 --- a/src/core/storage/LocalStoreCore.ts +++ b/src/core/storage/LocalStoreCore.ts @@ -23,6 +23,7 @@ export class LocalStoreCore extends LocalStore { this.knex = this.buildKnex(); await this.knex.raw('PRAGMA journal_mode = WAL;'); await this.knex.raw('PRAGMA foreign_keys = ON;'); + await this.knex.raw('PRAGMA busy_timeout = 5000;'); } if (sessionName) { await fs.mkdir(this.getSessionDirectory(sessionName), { @@ -71,6 +72,14 @@ export class LocalStoreCore extends LocalStore { client: 'sqlite3', connection: { filename: database }, useNullAsDefault: true, + acquireConnectionTimeout: 120_000, + pool: { + min: 1, + max: 10, + idleTimeoutMillis: 60_000, + createTimeoutMillis: 120_000, + acquireTimeoutMillis: 120_000, + }, }); }