Questions tagged [hikaricp]

HikariCP is a high-performance JDBC connection pool library.

HikariCP is a "zero-overhead" production-ready JDBC connection pool. Hikari (光) is Japanese and means "light" or "ray".

Resources:

Spring prefers HikariCP as a connection pool to production databases:

We prefer HikariCP for its performance and concurrency. If HikariCP is available, we always choose it.

1370 questions
12
votes
3 answers

Configuring Hibernate with HikariCP

Because of problems with c3p0 connection pool, I want to see the alternatives and decide which one might be more usable in my case. HikariCP looks very promising, but there is no documentation how to use it with Hibernate. So far I am using c3p0 as…
Vojtěch
  • 11,312
  • 31
  • 103
  • 173
11
votes
3 answers

How do I configure HikariCP for postgresql?

I'm trying to use HikariCP in postgresql and I can't find anywhere the configuration for postgresql. Please point me to any example for postgresql with HikariCP or any configurations tutorial for the same. I tried to use it like below but it…
MbaiMburu
  • 875
  • 1
  • 10
  • 19
11
votes
1 answer

No operations allowed after connection closed errors in Slick/HikariCP

I'm using Slick3.1.1 + HikariCP2.5.1. My config is: rdsConfig = { url = "jdbc:mysql://mydb.........us-west-2.rds.amazonaws.com:3306/owlschema" driver = "com.mysql.jdbc.Driver" connectionPool = HikariCP maxConnections = 222 …
thund
  • 1,842
  • 2
  • 21
  • 31
11
votes
4 answers

Prepared Statement Cache with MySQL & JDBC

I read that MySQL does not support server side query plan caching. So if i want to use PreparedStatements for performance benefits, what i can do is enable statement caching in JDBC Connection. So as per the docs it will enable caching of prepared…
snegi
  • 636
  • 1
  • 6
  • 22
10
votes
1 answer

HikariCP - MYSQL No operations allowed after connection closed. Possibly consider using a shorter maxLifetime value

I am using mysql database. It has the default wait timeout of 28800 mysql> SHOW VARIABLES like '%timeout%'; +-----------------------------+----------+ | Variable_name | Value | +-----------------------------+----------+ |…
Abhinaya P
  • 244
  • 3
  • 13
10
votes
1 answer

HikariCP connection pool - 'active' - how to debug?

I am building an app using Spring-Boot/Hibernate with Postgres as the database. I am using Spring 2.0, so Hikari is the default connection pool provider. Currently, I am trying to load-test the application with a REST end-point that does an…
FrailWords
  • 886
  • 7
  • 19
10
votes
3 answers

Spring Boot autoconfig is still taking Tomcat Datasource instead HikariCP?

I have my Spring Boot 1.2.5.RELEASE service and I want to use the HikariCP datasource instead of the default tomcat-jdbc. So, according to this Spring Boot Reference I understand I just have to exclude tomcat-jdbc from the classpath and add…
jscherman
  • 5,839
  • 14
  • 46
  • 88
10
votes
2 answers

How to configure HikariCP for Slick 3.0.0 RC1 on Typesafe conf

I have a Play Application based on the play-scala Typesafe template (Play Scala Seed), and tried to add Slick 3.0.0 to the project and connect to a PostgreSQL database. First I added the dependencies to build.sbt: libraryDependencies ++= Seq( …
Guillermo Gutiérrez
  • 17,273
  • 17
  • 89
  • 116
9
votes
1 answer

Experiencing deadlocks when using the Hikari transactor for Doobie with ZIO

I'm using Doobie in a ZIO application, and sometimes I get deadlocks (total freeze of the application). That can happen if I run my app on only one core, or if I reach the number of maximum parallel connections to the database. My code looks…
fanf42
  • 1,828
  • 15
  • 22
9
votes
2 answers

Hikari "Add connection elided"

I am getting the following messages running a task in spring cloud data flow. DEBUG 13167 --- [spring_batch146] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Add connection elided, waiting 1, queue 2 I can't find any information on it.
Sam Donato
  • 471
  • 6
  • 12
9
votes
3 answers

How do I know if the prepared statements are cached?

I am using Hikari with SQL Server 2016 and sqljdbc4-2.0.jar in the tomcat lib folder. My configuration for db resource is as follows:
would_like_to_be_anon
  • 1,639
  • 2
  • 29
  • 47
9
votes
2 answers

Hikari - Spring Boot is ignoring hikari properties

I have a Spring Boot 2 application which has two datasources. Both datasources work, however I am unable to change properties such as maximum-pool-size, my changes are not taking effect. I am configuration my two datasources in my…
SheppardDigital
  • 3,165
  • 8
  • 44
  • 74
9
votes
1 answer

Hikari and test on borrow option

I use spring boot 2 with Hikari connection pool, jpa and postgres. Is there any reason to continue to use theses options spring.datasource.testOnBorrow=true spring.datasource.validationQuery=SELECT 1 spring.datasource.testWhileIdle
robert trudel
  • 5,283
  • 17
  • 72
  • 124
9
votes
2 answers

Connection pooling in multi tenant app. Shared pool vs pool per tenant

I'm building a multi tenant REST server application with Spring 2.x, Hibernate 5.x, Spring Data REST, Mysql 5.7. Spring 2.x uses Hikari for connection pooling. I'm going to use a DB per tenant approach, so every tenant will have his own database. I…
drenda
  • 5,846
  • 11
  • 68
  • 141
9
votes
1 answer

javax.management.InstanceAlreadyExistsException: com.zaxxer.hikari:name=dataSource,type=HikariDataSource

How can i solve this problem? Which is best choice and how to do that set unique poolName destroy previous connection pool org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext 11-Aug-2018 16:05:53.863…
Naranmandakh Tsogoo
  • 221
  • 2
  • 4
  • 10