From 75dfc638e1a9373698584fac7e241cfe803245fc Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 22 May 2023 10:34:57 -0400 Subject: [PATCH] Pool size auto-configure --- src/engine/gameManager/DbManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/gameManager/DbManager.java b/src/engine/gameManager/DbManager.java index c5271801..17d01365 100644 --- a/src/engine/gameManager/DbManager.java +++ b/src/engine/gameManager/DbManager.java @@ -298,7 +298,7 @@ public enum DbManager { HikariConfig config = new HikariConfig(); - config.setMaximumPoolSize(50); + config.setMaximumPoolSize(Runtime.getRuntime().availableProcessors() * 2); config.setJdbcUrl("jdbc:mysql://" + ConfigManager.MB_DATABASE_ADDRESS.getValue() + ":" + ConfigManager.MB_DATABASE_PORT.getValue() + "/" +