Reset (autoCommit) on connection in HikariCP

9.5k views Asked by At

I keep seeing this log when I use connections in Hikari pool.

[com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314
[com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314
[com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314
[com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314
[com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314
[com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314
[com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314

What does that mean? Is this something I should worry about/fix, or is it normal? I'm trying to understand what really happens there.

1

There are 1 answers

4
brettw On BEST ANSWER

It means either:

  • the pool is configured as auto-commit, but code is changing connections to autoCommit=false, and then returning them to the pool, or
  • the pool is configured as not auto-commit, but code is changing the connections to autoCommit=true, and then returning them to the pool.

HikariCP will reset autoCommit to the pool default whenever a connection is returned with a different autoCommit mode. In general this can have a negative impact on performance; sometimes quite large.