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.

1096 questions
98
votes
17 answers

How do I configure HikariCP in my Spring Boot app in my application.properties files?

I'm trying to set up HikariCP in my Spring Boot (1.2.0.M1) app so I can test using it in place of Tomcat DBCP. I'd like to configure the connection pool in my application.properties file like I was doing with Tomcat, but I can't figure out how I…
Kevin M
  • 2,345
  • 3
  • 22
  • 30
80
votes
2 answers

HikariCP - connection is not available

We have Spring-boot/Hibernate/PostgreSQL application in our project and use Hikari as the connection pool. We keep running into the following problem: after few hours active connections number grows to the limit and we get the errors like this (full…
dfche
  • 2,495
  • 1
  • 20
  • 26
55
votes
6 answers

Log warning: Thread starvation or clock leap detected (housekeeper delta=springHikariConnectionPool)

I'm using HikariCP 2.4.6 and at Tomcat 8 startup, I get a warning message: 01-Aug-2016 11:18:01.599 INFO [RMI TCP Connection(4)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log Initializing Spring FrameworkServlet 'Spring MVC Dispatcher…
vphilipnyc
  • 6,607
  • 6
  • 44
  • 70
43
votes
3 answers

HikariCP Postgresql Driver Claims to not accept JDBC URL

I've pushed my application to cloudfoundry. However every time I connect to my postgresql/elephant sql I received this error Driver org.postgresql.Driver claims to not accept JDBC URL…
user962206
  • 13,699
  • 56
  • 164
  • 259
42
votes
9 answers

How to set up datasource with Spring for HikariCP?

Hi I'm trying to use HikariCP with Spring for connection pool. I'm using jdbcTempLate and JdbcdaoSupport. This is my spring configuration file for datasource:
Abhinab Kanrar
  • 1,506
  • 2
  • 19
  • 43
31
votes
1 answer

Default maximumPoolSize for HikariCP

What is the default connection pool size that spring boot HikariCP provides when the container loads? of course, I am using below properties to setup max cp size, but I was wondering what is the default CP size if we don't give any number in the…
Hari
  • 311
  • 1
  • 3
  • 3
28
votes
11 answers

How to set correct MySQL JDBC timezone in Spring Boot configuration

DB: $ mysql --version mysql Ver 14.14 Distrib 5.6.27, for osx10.10 (x86_64) using EditLine wrapper Spring Boot: 2.1.1.RELEASE The error: 2019-01-01 15:56:25.849 ERROR 39957 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool :…
Michael Coxon
  • 2,737
  • 5
  • 35
  • 59
25
votes
2 answers

Play application dies in idle state, restart on new request?

I am using HikariCp, Hibernate with my playframework application in java. After few mins of idle state, it seems play application dies, and when it gets new request it starts again. Sometime I have also seen Db persistence error with message that…
24
votes
2 answers

How to use HikariCP in Spring Boot with two datasources in conjunction with Flyway

I want to use HikariCP as JDBC connection pool in my Spring boot application. I have two datasources (MySQL database as the primary database and accessing those data through Hibernate and additionally an Oracle database for reading some other data…
ThomasW
  • 391
  • 1
  • 3
  • 11
21
votes
2 answers

Why does HikariCP recommend fixed size pool for better performance

According to HikariCP's documentation they mentioned to create fixed size pool for better performance. minimumIdle: This property controls the minimum number of idle connections that HikariCP tries to maintain in the pool.If the idle connections…
shivadarshan
  • 766
  • 2
  • 11
  • 20
21
votes
4 answers

Disable HikariPool logging

This is perhaps a very simple question. How do i disable Hikari-CP debug logs? In my log file i have lots of these messages DEBUG [.zaxxer.hikari.pool.HikariPool:] - Before cleanup pool stats HikariPool-0 (total=10, inUse=0, avail=10,…
siphiuel
  • 2,977
  • 3
  • 23
  • 30
21
votes
1 answer

Best approach for returning connection objects to HikariCP pool

I am trying to use HikariCP connection pool. I was able to get it to work and get a connection that I could use. I am not sure what is the best approach for returning the connection to the pool. I have the following questions: Should I close the…
user3813256
20
votes
1 answer

How does HikariCP handle incomplete JDBC transactions?

Yesterday I came across HikariCP and spent the whole night studying it. I'm really impressed with the amount of detail and effort put into fine tuning its implementation and design. Straight to the point, I could not determine how it actually deals…
Hamid Nazari
  • 479
  • 7
  • 13
19
votes
2 answers

Spring retry connection until datasource is available

I have a docker-compose setup to start my SpringBoot application and a MySQL database. If the database starts first, then my application can connect successfully. But if my application starts first, no database exists yet, so the application throws…
Leonardo Nahra
  • 193
  • 1
  • 6
19
votes
1 answer

Scala / Slick, "Timeout after 20000ms of waiting for a connection" error

The block of code below has been throwing an error. Timeout after 20000ms of waiting for a connection.","stackTrace":[{"file":"BaseHikariPool.java","line":228,"className":"com.zaxxer.hikari.pool.BaseHikariPool","method":"getConnection" Also, my…
user2827214
  • 1,139
  • 1
  • 11
  • 31
1
2 3
73 74