Skip to content

Connection pooling properties

This is list of properties that are used in Connection pooling in Data Sources.

These options are inside given data source configuration file. For example: postgresTest-source_1.conf. The filename depends on the name of the data source → nameOfDataSource.conf.

⚠️ Note: You can use SHIFT with mouse scroll to scroll horizontally!

Key Description Possible values Default
defaultAutoCommit The default auto-commit state of connections created by this pool. If not set, default is JDBC driver default (If not set then the setAutoCommit method will not be called.) Boolean - (method not called)
defaultReadOnly The default read-only state of connections created by this pool. If not set then the setReadOnly method will not be called. (Some drivers don't support read only mode, ex: Informix) Boolean - (method not called)
defaultTransactionIsolation The default TransactionIsolation state of connections created by this pool. One of the following: NONE,READ_COMMITTED,READ_UNCOMMITTED,REPEATABLE_READ,SERIALIZABLE. If not set, the method will not be called and it defaults to the JDBC driver. String Default to JDBC driver
defaultCatalog The default catalog of connections created by this pool. String -
maxActive The maximum number of open connections Integer 0 ( no limit )
rateLimit Total connections/ms that can be opened, minimum of 1 Integer 2
maxBurst Number of ms of burst that can be allowed before clamping occurs Integer 50
maxUserActive The maximum number of open connections for a particular user, can be overridden with a rule Integer 0 ( no limit )
maxUserIdle The max number of idle connections for a particular user, can be overwridden with a rule Integer 0 ( no limit )
maxWait The time to wait in milliseconds before a SQLException is thrown when a connection is requested Integer 3000
maxAge The chances of a connection being closed when being returned to the pool (1 out of X) or during an eviction run if idle. Old behavior was the Time in milliseconds to expire the connection on return or idle. connections less than the timeBetweenEvictionRunsMillis will not be culled at random, so if there is activity on the connection at least that often, it will remain connected Long 30
idleSessionTimeout Time (ms) after which the connection will be delete from idle pool during eviction run. It has increasingly higher chance of being closed starting when 75% of idleSessionTimeout time had passed Integer 0 ( disabled )
validationQuery The query to run during validation String -
resetQuery The query to run after a connection is returned to the pool String -
validationQueryTimeout The timeout in seconds before a connection validation/reset queries fail. Negative integers get changed to 0 which means no timeout. Integer -1 ( no timeout )
testOnBorrow True if validation happens when a connection is requested Boolean false
testOnReturn True if validation happens when a connection is returned, implied with a reset query Boolean false
testWhileIdle True if validation happens when a connection is not in use (idle) Boolean false
testOnConnect Validate connection after connection has been established Boolean false
timeBetweenEvictionRunsMillis Sleep time for background thread in between pool checks Integer 5000
minEvictableIdleTimeMillis Minimum amount of time a connection stays idle before it is evicted Integer 60000
removeAbandoned True if connection in use can be timed out Boolean false
removeAbandonedTimeout Timeout in seconds for connections in use Integer 60
logAbandoned If true, stack trace will be recorded and printed out for timed out connection Boolean false
abandonWhenPercentageFull Connections that have been abandoned aren't closed unless connections in use are above this percentage Integer 0
validationInterval If larger than zero than validation will only occur after the interval milliseconds has passed (Long) Long 3000
suspectTimeout Timeout in seconds for connection that suspected to have been abandoned Integer 0 ( not used )
commitOnReturn If autoCommit==false then the pool can complete the transaction by calling commit on the connection as it is returned to the pool Boolean false
connectionProperties The connection properties that will be set for new connections. Format of the string will be [propertyName=property;]* String -
initSQL A SQL executed once per connection, when it is established String -
logValidationErrors Log errors during the validation phase to the log file Boolean false
rollbackOnReturn If autoCommit==false then the pool can terminate the transaction by calling rollback on the connection as it is returned to the pool Boolean true