You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using HikariCP 5.1.0 and Postgres driver org.postgresql:postgresql:42.6.2.
The HikariConfig.connectionTimeout property is not passed on to the driver - setting the timeout has no effect on the final connection timeout.
After some debugging I found that the driver is trying to fetch "loginTimeout" property from the Properties object that is passed to the driver, but that property is never set. During PoolBase initialization the setLoginTimeout method is calling DriverDataSource implementation, which calls DriverManager.setLoginTimeout(seconds), however, the Postgres driver doesn't use this value.
I tested this with an Oracle driver com.oracle.database.jdbc:ojdbc8:21.9.0.0. In that case the property works fine.
For now I made I quick hack for Postgres and during pool configuration I added this line: hikariConfig.addDataSourceProperty("loginTimeout", 3);
The text was updated successfully, but these errors were encountered:
I'm using HikariCP 5.1.0 and Postgres driver org.postgresql:postgresql:42.6.2.
The HikariConfig.connectionTimeout property is not passed on to the driver - setting the timeout has no effect on the final connection timeout.
After some debugging I found that the driver is trying to fetch "loginTimeout" property from the Properties object that is passed to the driver, but that property is never set. During
PoolBase
initialization thesetLoginTimeout
method is callingDriverDataSource
implementation, which callsDriverManager.setLoginTimeout(seconds)
, however, the Postgres driver doesn't use this value.I tested this with an Oracle driver com.oracle.database.jdbc:ojdbc8:21.9.0.0. In that case the property works fine.
For now I made I quick hack for Postgres and during pool configuration I added this line:
hikariConfig.addDataSourceProperty("loginTimeout", 3);
The text was updated successfully, but these errors were encountered: