Fix Hikari timeouts

This commit is contained in:
Gabriele C 2015-09-06 13:51:35 +02:00
parent 78d6b9cc6b
commit 3926faeb35
3 changed files with 11 additions and 6 deletions

View File

@ -13,6 +13,11 @@
<url>http://dev.bukkit.org/bukkit-plugins/authme-reloaded/</url>
<!-- See also: https://www.spigotmc.org/resources/authme-reloaded.6269/ -->
<organization>
<name>AuthMe-Team</name>
<url>https://github.com/AuthMe-Team</url>
</organization>
<scm>
<connection>scm:git:https://github.com/Xephi/AuthMeReloaded.git</connection>
<developerConnection>scm:git:git@github.com:Xephi/AuthMeReloaded.git</developerConnection>

View File

@ -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!");
}

View File

@ -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!");
}