Does the query executed in Spring Boot is creating a new connection or using connection pool?

26 Views Asked by At

Using spring boot 2.7.x with HikariCP and MySQL database.

A team reported an issue that after adding the health check feature, Authentication request against the DB is drastically increased (i.e Creating new connection every time).

Theoretically , Actuator API is using the Jdbctemplate to check the DataSource health check (DataSourceHealthIndicator). So, it should fetch the connection from the connection pool.

I want to prove that its not creating a new connection every time. Is there any way to enable the logs to check whether the query executed is creating a new connection or using the connection pool? or any other debugging techniques available?

0

There are 0 best solutions below