You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Database Connection Pool Parameters

This page lists and describes the connection pool parameters available to be used in codebeamer version 21.09 (EMMA), and in version 22.04 (FELICITY).

Only in codebeamer version 21.09 (EMMA)

These variables are not available from codebeamer 22.04 (FELICITY) release. In case the usage of these parameters is intended from version 22.04 (FELICITY), refer to the next section.

  • CB_application_database_pool_max_active
    Max active connection by application database pool. Default value: 35

  • CB_application_database_pool_max_idle
    Max idle connection by application database pool. Default value: 15

  • CB_application_database_pool_min_idle
    Min idle connection by application database pool. Default value: 10

  • CB_quartz_database_pool_max_active
    Max active connection by quartz database pool. Default value: 35

  • CB_quartz_database_pool_max_idle
    Max idle connection by quartz database pool. Default value: 15

  • CB_quartzdatabase_pool_min_idle
    Min idle connection by quartz database pool. Default value: 10
    There is a known typo in "CB_quartzdatabase_pool_min_idle" which will be changed in the next version.


Connection timeout cannot be set via environment variable.



Since codebeamer version 22.04 (FELICITY)

HikariCP is introduced as a new type of connection pool making it possible to switch the pool type:

  • CB_DATABASE_POOL_TYPE
    • Valid values: TOMCAT or HIKARICP
    • Default value is TOMCAT


All parameters supported by connection pool types are supported and can be set via environment variables.


The pattern to be used: CB_[database-provider]_pool_[parameter] or CB_[database-provider}_pool_quartz_[parameter]

  • [database-provider] - the name of the database provider: tomcat or hikaricp
  • [parameter] - the name of the parameter to be set


Example #1


Tomcat CP provides a parameter called 'maxActive'.

To set this parameter, the below environment variables can be used:

  • CB_tomcat_pool_maxActive
  • CB_tomcat_pool_quartz_maxActive


Example #2


HikariCP provides a parameter called 'maximumPoolSize'.

To set this parameter, the following environment variables can be used:

  • CB_hikaricp_pool_maximumPoolSize
  • CB_hikaricp_pool_quartz_maximumPoolSize


Connection pool specific parameters

See the connection pool specific parameters for Tomcat and HikariCP in the below sections.

Tomcat

For details on the Tomcat Connection Pool, see: https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#System_Properties


  • Most common parameters:
    • CB_tomcat_pool_maxActive
      Max active connection by application database pool. Default value: 35
    • CB_tomcat_pool_maxIdle
      Max idle connection by application database pool. Default value: 15
    • CB_tomcat_pool_minIdle
      Min idle connection by application database pool. Default value: 10
    • CB_tomcat_pool_quartz_maxActive
      Max active connection by quartz database pool. Default value: 35
    • CB_tomcat_pool_quartz_maxIdle
      Max idle connection by quartz database pool. Default value: 15
    • CB_tomcat_pool_quartz_minIdle
      Min idle connection by quartz database pool. Default value: 10


  • Quartz timeout
    • CB_tomcat_pool_quartz_jdbcInterceptors=org.apache.tomcat.jdbc.pool.interceptor.QueryTimeoutInterceptor(queryTimeout=[timeoutInSec])
      changes [timeoutInSec] to the desired value in seconds.


  • Default values used by CB:
    defaultAutoCommit: true
    defaultReadOnly: false
    defaultTransactionIsolation: READ_COMMITTED
    initialSize: 0
    logAbandoned: false
    maxActive: 35
    maxIdle: 15
    maxWait: 60000
    minEvictableIdleTimeMillis: 300000
    minIdle: 10
    removeAbandoned: false
    removeAbandonedTimeout: 300
    testOnBorrow: true
    testOnReturn: false
    testWhileIdle: false
    timeBetweenEvictionRunsMillis: 60000
    validationQuery: SELECT 1
    validationInterval: 30000
    validationQueryTimeout: 2

HikariCP

For more information on HikariCP configuration, see https://github.com/brettwooldridge/HikariCP#gear-configuration-knobs-baby.


  • Most common parameters:
    • CB_hikaricp_pool_minimumIdle
      Min idle connection by application database pool. Default value: 35
    • CB_hikaricp_pool_maximumPoolSize
      Maximum size that the application database pool is allowed to reach, including both idle and in-use connections. Default value: 35
    • CB_hikaricp_pool_quartz_minimumIdle
      Min idle connection by quartz database pool. Default value: 35
    • CB_hikaricp_pool_quartz_maximumPoolSize
      Maximum size that the quartz database pool is allowed to reach, including both idle and in-use connections. Default value: 35


  • Quartz timeout
    • CB_hikaricp_pool_quartz_connectionTimeout=[timeoutInMs]
      change [timeoutInMs] to the desired value in milliseconds.


  • Defaults used by CB:
    autoCommit: true
    connectionTestQuery: SELECT 1
    connectionTimeout: 60000
    idleTimeout: 300000
    initializationFailTimeout: 0
    keepaliveTime: 0
    leakDetectionThreshold: 6000
    minimumIdle: 35
    maximumPoolSize: 35
    maxLifetime: 1800000
    poolName: ApplicationPool
    readOnly: false
    registerMbeans: true
    transactionIsolation: TRANSACTION_READ_COMMITTED
    validationTimeout: 2000


Setting a parameter which is not supported by the type of connection pool chosen, the Data Source might fail to initialize.

Since codebeamer version 22.04-SP2 (FELICITY)

Timeout and Quartz Timeout can be configured separately. If Quartz Timeout is not configured, then Timeout is used.


A database configuration is considered correct or complete if the Driver and URL properties are not blank.

The priority is as follows:

  1. environment variables - if the configuration is correct, this will be used.
  2. configuration file - if the configuration is correct, this will be used.

If neither is correct, the install mode should run.


Examples configuring the same database


  1. environment variables
    -DCB_database_JDBC_Driver=org.postgresql.Driver
    -DCB_database_JDBC_ConnectionURL=jdbc:postgresql://localhost:5432/codebeamer_master
    -DCB_database_JDBC_Username=user
    -DCB_database_JDBC_Password=pass
    -DCB_database_JDBC_Timeout=1000
    -DCB_database_JDBC_Quartz_Timeout=2000
    -DCB_database_JDBC_PasswordStorageType=ENCRYPTED
    -DCB_DATABASE_POOL_TYPE=TOMCAT
    
  2. configuration file
    database.driver=org.postgresql.Driver
    database.connectionURL=jdbc:postgresql://localhost:5432/codebeamer_master
    database.username=user
    database.password=pass
    database.timeout=5000
    database.quartzTimeout=6000
    database.connectionPoolType=TOMCAT
    database.passwordStorageType=ENCRYPTED
    


See also: SQL Database Timeout