Skip to content

conn-max-age setting has no affect?? #4017

@alexjfisher

Description

@alexjfisher

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

(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions