From b553c5b8b33a6bd8b85e315341c99ed7a4ab333e Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Sun, 31 Dec 2023 03:04:19 +1100 Subject: [PATCH] Add database connection pool --- src/components/DatabaseServer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DatabaseServer.ts b/src/components/DatabaseServer.ts index 031c5bf..2528c66 100644 --- a/src/components/DatabaseServer.ts +++ b/src/components/DatabaseServer.ts @@ -4,7 +4,7 @@ import TSClient from '../helpers/TSClient.js'; const postgresUri = (await TSClient()).postgres_uri; export default class DatabaseServer { - public static seq:Sequelize = new Sequelize(postgresUri, {dialect: 'postgres', logging: false, ssl: false}) + public static seq:Sequelize = new Sequelize(postgresUri, {dialect: 'postgres', logging: false, ssl: false, pool: {max: 10, min: 0, acquire: 15000, idle: 8000}}) public static async init() { try { await this.seq.authenticate();