Unfortunately, It’s difficult to guess what caused the problem without seeing the project. If you could provide a simple example project where the problem can be reproduced I will be able to investigate the reason of it.
I had added below line but still getting timeout 30000 it occurs when we try to insert data using jdbctemplate is it possible to disable hikari from project because most of the time due to timeout some functionality gets impacted due to timeout.
Any also can we implement any other connection pooling in jmix.
main.datasource.hikari.max-lifetime = 900000
java.sql.SQLTransientConnectionException: HikariPool-62 - Connection is not available, request timed out after 30000ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128)
java.sql.SQLTransientConnectionException: HikariPool-62 - Connection is not available, request timed out after 30000ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128)
java.sql.SQLTransientConnectionException: HikariPool-62 - Connection is not available, request timed out after 30000ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
java.sql.SQLTransientConnectionException: HikariPool-62 - Connection is not available, request timed out after 30000ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128)
Another thing to be checked: is this problem occur for the main datasource? In case of additional datasource its configuration will look like this: <datasourceName>.datasource.hikari.*
If none of this helps I would recommend putting breakpoints inside com.zaxxer.hikari.HikariConfig#setConnectionTimeout and com.zaxxer.hikari.HikariConfig#validateNumerics to see why this 30000 ms is set to com.zaxxer.hikari.HikariConfig#connectionTimeout.
After timeout will be increased:
If increasing timeout will not help to solve the problem, please check whether the connections hang somehow because of locks, too long operations, or pool depletion. That’s all I can guess without seeing a reproducible example.
If you still want to try another connection pool:
Please, take note that Jmix has not been fully tested with other connection pools and flawless work is not guaranteed with them.
But if you want to use another connection pool you can configure it like for any other spring boot application. Replace the next lines in your <ProjectName>Application.java: