brettwooldridge / HikariCP

光 HikariCP・A solid, high-performance, JDBC connection pool at last.
Apache License 2.0
19.63k stars 2.9k forks source link

Max-life-time expire cause application latency #2203

Open bantify opened 1 month ago

bantify commented 1 month ago

I use hikari cp as per below configuration:

cm {
    database = {
      data-source-class = "org.mariadb.jdbc.Driver"
      socket-file       = "/var/lib/maxscale/maxscale.sock"
      host              = "localhost"
      port              = 3306
      name              = "webdb"
      user              = "xxxxxxxxxx"
      password          = "xxxxxxxxxxxxx"
      pool-size         = 24
      max-life-time     = 600000
      socket-timeout    = 60000
    }
  }

Here max-life-time is 10 minutes. We see also application latency high in every 10 minutes. Also we see connections drop to 0 in every 10 minutes and it takes (few seconds) time to create 24 new connections.

During the time application response becomes high.

Please help.

svendiedrichsen commented 1 month ago

I think this could help: https://github.com/brettwooldridge/HikariCP/pull/2035