From 05fe511bdac0bae0f7d4046cf2c053af0aca1ec6 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 1 Aug 2020 01:42:58 -0700 Subject: [PATCH] stop connection pooling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit oof, got "too many connections" from mysql, this is probably gonna be a scaling issue in timeā€¦ for now, stop requesting a pool of 5, even on dev lolol, and just go with a single connection per instance --- src/server/db.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/db.js b/src/server/db.js index 9b3b737..ffd1c0d 100644 --- a/src/server/db.js +++ b/src/server/db.js @@ -7,8 +7,7 @@ async function connectToDb() { return globalDb; } - globalDb = await mysql.createPool({ - connectionLimit: 5, + globalDb = await mysql.createConnection({ host: "impress.openneo.net", user: process.env["IMPRESS_MYSQL_USER"], password: process.env["IMPRESS_MYSQL_PASSWORD"],