Fixed user defined JDBC URL override not working. (#1499)
Fixes logic error in the way a user defined `jdbcUrl` in `hikaricp.properties` is handled. Additionally changed the default max pool size to the previous limit of 90 connections. PR #926 originally also had this but this apparantly fell out. Testing showed that during first time server startup a flood of connection can be made and a connection pool of 30 can be overwhelmed and callers waiting on a connection will time-out.
This commit is contained in:
parent
08c1727c60
commit
0173bbd296
|
@ -52,7 +52,7 @@ connectionTimeout=60000
|
|||
# will block for up to connectionTimeout milliseconds before timing out. Please
|
||||
# read about pool sizing: https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
|
||||
# Default: 10
|
||||
maximumPoolSize=30
|
||||
maximumPoolSize=90
|
||||
|
||||
# This property controls the maximum lifetime of a connection in the pool. An
|
||||
# in-use connection will never be retired, only when it is closed will it then be
|
||||
|
@ -69,4 +69,4 @@ maximumPoolSize=30
|
|||
# pool before a message is logged indicating a possible connection leak. A value of 0
|
||||
# means leak detection is disabled. Lowest acceptable value for enabling leak detection
|
||||
# is 2000 (2 seconds). Default: 0
|
||||
leakDetectionThreshold=300000
|
||||
leakDetectionThreshold=300000
|
||||
|
|
|
@ -721,13 +721,13 @@ public class DB_Oracle implements AdempiereDatabase
|
|||
Properties poolProperties = getPoolProperties();
|
||||
// Do not override values which might have been read from the users
|
||||
// hikaricp.properties file.
|
||||
if(!poolProperties.contains("jdbcUrl")) {
|
||||
if(!poolProperties.containsKey("jdbcUrl")) {
|
||||
poolProperties.put("jdbcUrl", getConnectionURL(connection));
|
||||
}
|
||||
if (!poolProperties.contains("username")) {
|
||||
if (!poolProperties.containsKey("username")) {
|
||||
poolProperties.put("username", connection.getDbUid());
|
||||
}
|
||||
if (!poolProperties.contains("password")) {
|
||||
if (!poolProperties.containsKey("password")) {
|
||||
poolProperties.put("password", connection.getDbPwd());
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ connectionTimeout=60000
|
|||
# will block for up to connectionTimeout milliseconds before timing out. Please
|
||||
# read about pool sizing: https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
|
||||
# Default: 10
|
||||
maximumPoolSize=30
|
||||
maximumPoolSize=90
|
||||
|
||||
# This property controls the maximum lifetime of a connection in the pool. An
|
||||
# in-use connection will never be retired, only when it is closed will it then be
|
||||
|
@ -69,4 +69,4 @@ maximumPoolSize=30
|
|||
# pool before a message is logged indicating a possible connection leak. A value of 0
|
||||
# means leak detection is disabled. Lowest acceptable value for enabling leak detection
|
||||
# is 2000 (2 seconds). Default: 0
|
||||
leakDetectionThreshold=300000
|
||||
leakDetectionThreshold=300000
|
||||
|
|
|
@ -747,13 +747,13 @@ public class DB_PostgreSQL implements AdempiereDatabase
|
|||
Properties poolProperties = getPoolProperties();
|
||||
// Do not override values which might have been read from the users
|
||||
// hikaricp.properties file.
|
||||
if(!poolProperties.contains("jdbcUrl")) {
|
||||
if(!poolProperties.containsKey("jdbcUrl")) {
|
||||
poolProperties.put("jdbcUrl", getConnectionURL(connection));
|
||||
}
|
||||
if (!poolProperties.contains("username")) {
|
||||
if (!poolProperties.containsKey("username")) {
|
||||
poolProperties.put("username", connection.getDbUid());
|
||||
}
|
||||
if (!poolProperties.contains("password")) {
|
||||
if (!poolProperties.containsKey("password")) {
|
||||
poolProperties.put("password", connection.getDbPwd());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue