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
120
votes
18 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,717
  • 4
  • 26
  • 31
119
votes
8 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…
riddle_me_this
  • 8,575
  • 10
  • 55
  • 80
119
votes
6 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
  • 3,403
  • 2
  • 24
  • 32
65
votes
9 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
  • 15,637
  • 61
  • 177
  • 270
63
votes
3 answers

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
  • 631
  • 1
  • 5
  • 3
46
votes
13 answers

HikariPool-1 - Connection is not available, request timed out after 30000ms for very tiny load server

I have a small Java application for testing purposes. I have moved to hikari recently. What I notice is that I keep getting this error. java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after…
user8012596
  • 693
  • 1
  • 8
  • 16
44
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,532
  • 2
  • 20
  • 46
43
votes
3 answers

Possibly consider using a shorter maxLifetime value - hikari connection pool spring boot

After starting my SpringBoot application, getting an exception on few minutes of the server startup. Did not use any HikariPool Configuration externally, Spring Boot is using HikariPool by default This is the error I am getting in the…
Sanjog
  • 456
  • 1
  • 4
  • 6
35
votes
2 answers

Unable to acquire JDBC Connection

I have a Spring Boot project with Hibernate and Hikari DataSource. If i have some functionality with injected SessionFactory object to get session object, in few days I have such exception for any methods assosiated with db operations (only…
Kiril Mytsykov
  • 659
  • 2
  • 10
  • 21
32
votes
1 answer

Logging HikariCP Spring boot

i set my properties in my application.yml spring.datasource.hikari.connection-timeout: 30000 spring.datasource.hikari.maximum-pool-size: 10 spring.datasource.hikari.idle-timeout: 600000 spring.datasource.hikari.minimum-idle: 10 Spring is…
resla95
  • 1,017
  • 2
  • 11
  • 18
31
votes
2 answers

Apparent connection leak detected with Hikari CP

When using native sql operator IN i get exception. Although it throws an exception, it still works as it was intended, but the exception in the logs is a bit annoying. I think it has something to do with the IN operator. @Query("select c from…
mario
  • 632
  • 1
  • 7
  • 16
31
votes
3 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
  • 481
  • 1
  • 6
  • 12
30
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
29
votes
12 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
  • 3,337
  • 8
  • 46
  • 68
29
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
  • 896
  • 2
  • 15
  • 25
1
2 3
91 92