-
Notifications
You must be signed in to change notification settings - Fork 227
Description
The conn-max-age
setting is described in the PuppetDB docs as
The maximum time (in minutes), for a pooled connection to remain unused before it is closed off.
In the code it is used, (under some condition at least), to set the connection pool's IdleTimeout
puppetdb/src/puppetlabs/puppetdb/jdbc.clj
Lines 596 to 597 in 2c2efc9
(when (and conn-max-age-ms conn-lifetime-ms (> conn-max-age-ms conn-lifetime-ms)) | |
(some->> conn-max-age-ms (.setIdleTimeout config))) |
According to the HikariCP
documentation on IdleTimeout
This setting only applies when minimumIdle is defined to be less than maximumPoolSize.
and since there is no mechanism in PuppetDB to set minimumIdle
(the minimum number of idle connections that HikariCP tries to maintain in the pool), and this setting is not set to anything by PuppetDB and in HikariCP
defaults to the same as maximumPoolSize
Default: same as maximumPoolSize
I suggest that conn-max-age
is redundant as it does nothing. But maybe I've misread the code somewhere.