I have an mqtt client getting request subscribing from topics, and then I give it to threadpool of fixed size 50. Im using hikaricp 2.4.2 for DB Pooling MySQL database.
Im currently using 2.4.2 and this is my setup
HikariConfig config = new HikariConfig();
config.setDataSourceClassName(CLASS_FOR_NAME);
config.setJdbcUrl(HOST);
config.setUsername(USER);
config.setPassword(PASS);
config.addDataSourceProperty("cachePrepStmts", "true");
config.addDataSourceProperty("prepStmtCacheSize", "250");
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
config.setLeakDetectionThreshold(TimeUnit.SECONDS.toMillis(30));
config.setValidationTimeout(TimeUnit.MINUTES.toMillis(1));
config.setMaximumPoolSize(10);
config.setMinimumIdle(0);
config.setMaxLifetime(TimeUnit.MINUTES.toMillis(2)); // 120 seconds
config.setIdleTimeout(TimeUnit.MINUTES.toMillis(1)); // minutes
config.setConnectionTimeout(TimeUnit.MINUTES.toMillis(5));
config.setConnectionTestQuery("/* ping */ SELECT 1");
Heres the full log message :
WARNLOG:
811439 [Hikari housekeeper (pool HikariPool-0)] WARN com.zaxxer.hikari.pool.ProxyLeakTask - Connection leak detection triggered for connection com.mysql.jdbc.JDBC4Connection@11d0896, stack trace follows java.lang.Exception: Apparent connection leak detected at com.hcpdatabase.DataSource.getConnection(DataSource.java:69) at com.database.AccessDatabase.create_alert(AccessDatabase.java:3849) at com.runnable.StartTaskRunnable2.execute(StartTaskRunnable2.java:78)
Is this normal ? do i have to catch this?