[core] NOWEB - sqlite3 increase timeouts

This commit is contained in:
devlikepro committed 2025-11-04 14:00:24 +07:00
1 parent f16eaed935
commit 47f4f2670d
1 file changed
+9
+9
View File
@@ -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,
},
});
}