From 3926faeb35c4379591bdf17a4b682720b547f6c1 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Sun, 6 Sep 2015 13:51:35 +0200 Subject: [PATCH] Fix Hikari timeouts --- pom.xml | 5 +++++ src/main/java/fr/xephi/authme/datasource/MySQL.java | 6 +++--- src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index cecb3117f..7182eff48 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,11 @@ http://dev.bukkit.org/bukkit-plugins/authme-reloaded/ + + AuthMe-Team + https://github.com/AuthMe-Team + + scm:git:https://github.com/Xephi/AuthMeReloaded.git scm:git:git@github.com:Xephi/AuthMeReloaded.git diff --git a/src/main/java/fr/xephi/authme/datasource/MySQL.java b/src/main/java/fr/xephi/authme/datasource/MySQL.java index 73f730ad6..24e37dbcd 100644 --- a/src/main/java/fr/xephi/authme/datasource/MySQL.java +++ b/src/main/java/fr/xephi/authme/datasource/MySQL.java @@ -138,9 +138,9 @@ public class MySQL implements DataSource { config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048"); config.addDataSourceProperty("autoReconnect", false); config.setInitializationFailFast(true); // Don't start the plugin if the database is unavariable - config.setMaxLifetime(60000); // 60 Sec - config.setIdleTimeout(45000); // 45 Sec - config.setMaximumPoolSize(50); // 50 Connections (including idle connections) + config.setMaxLifetime(180000); // 3 Min + config.setIdleTimeout(60000); // 1 Min + config.setMaximumPoolSize(50); // 50 (including idle connections) ds = new HikariDataSource(config); ConsoleLogger.info("Connection arguments loaded, Hikari ConnectionPool ready!"); } diff --git a/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java b/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java index 767a5da7d..2b6ea3869 100644 --- a/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java +++ b/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java @@ -126,9 +126,9 @@ public class SQLite_HIKARI implements DataSource { config.setJdbcUrl("jdbc:sqlite:plugins/AuthMe/" + database + ".db"); config.setInitializationFailFast(true); // Don't start the plugin if the database is unavariable config.setConnectionTestQuery("SELECT 1"); - config.setMaxLifetime(60000); // 60 Sec - config.setIdleTimeout(45000); // 45 Sec - config.setMaximumPoolSize(50); // 50 Connections (including idle connections) + config.setMaxLifetime(180000); // 3 Min + config.setIdleTimeout(60000); // 1 Min + config.setMaximumPoolSize(50); // 50 (including idle connections) ds = new HikariDataSource(config); ConsoleLogger.info("Connection arguments loaded, Hikari ConnectionPool ready!"); }