Record: ConnectionPool

Represents the properties, which are used to configure a DB connection pool. Default values of the fields can be set through the configuration API.

Closed record

Fields

  • maxOpenConnections int(default maxOpenConnections)
  • The maximum number of open connections that the pool is allowed to have. Includes both idle and in-use connections. The default value is 15. This can be changed through the configuration API with the ballerina.sql.maxOpenConnections key

  • maxConnectionLifeTime decimal(default maxConnectionLifeTime)
  • The maximum lifetime (in seconds) of a connection in the pool. The default value is 1800 seconds (30 minutes). This can be changed through the configuration API with the ballerina.sql.maxConnectionLifeTime key. A value of 0 indicates an unlimited maximum lifetime (infinite lifetime)

  • minIdleConnections int(default minIdleConnections)
  • The minimum number of idle connections that the pool tries to maintain. The default value is the same as maxOpenConnections and it can be changed through the configuration API with the ballerina.sql.minIdleConnections key