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
9
votes
1 answer

Spring Boot 2. Hikari Connection Pool optimization

I have a SpringBoot app, I was making some performance test in the controller, and I realized that whatever is the first query I put the controller, It take ages compare to the others... (ths DB is a remote connection, but I can't change this) long…
en Peris
  • 1,537
  • 12
  • 31
  • 63
9
votes
1 answer

Best practices for Spring Boot connection pool configuration

I am configuring JDBC connection pool for Spring Boot app and Postgres DB to use HikariCP connection pool and trying to find best practices for configuration setup, unfortunately there is not much info on this theme in the web. I am preparing my own…
Aliaksei Stadnik
  • 1,692
  • 3
  • 15
  • 32
9
votes
3 answers

Springboot HikariCP

I using springboot with HikariCP, but after a while my app crash and I got the error: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is…
Fabio Ebner
  • 2,613
  • 16
  • 50
  • 77
9
votes
1 answer

HikariCP connection timeout error after certain amount of queries

Before I get started, I'd like to say I've checked the following and they didn't help me: HikariCP connection error HikariCP - connection is not available https://github.com/brettwooldridge/HikariCP/issues/104 Essentially, I'm getting a HikariCP…
Arraying
  • 169
  • 2
  • 3
  • 10
9
votes
1 answer

HikariCP pass Oracle custom type

I switched to HikariCP from Oracle default datasource. There is a piece of code where I pass custom Oracle type to a stored parameter, and cast java.sql.Connection to oracle.jdbc.OracleConnection. try(OracleConnection connection = (OracleConnection)…
0bj3ct
  • 1,400
  • 4
  • 22
  • 51
9
votes
3 answers

Failed to get driver instance

I'm new to Spring (Boot) and trying to get a pooled database connection to a HSQLDB server. pom.xml org.springframework.boot spring-boot-starter-parent
Pacman
  • 568
  • 3
  • 6
  • 17
9
votes
2 answers

How do I mitigate Connection leak triggered for connection com.mysql.jdbc.JDBC4Connection@11d08960,

I have an mqtt client getting request subscribing from topics, and then I give it to threadpool of fixed size 50. Im using hikaricp 2.4.2 for DB Pooling MySQL database. Im currently using 2.4.2 and this is my setup HikariConfig config = new…
david
  • 2,900
  • 5
  • 28
  • 48
9
votes
4 answers

get active connection on HikariDataSource

I am trying to figure out how many connections are currently opened and I can't seem to find an obvious way to do that with Hikari. HikariPool exposes that information (getActiveConnections) but I don't see an easy way to access that from…
Stephane Nicoll
  • 31,977
  • 9
  • 97
  • 89
8
votes
0 answers

Spring boot context load test hangs

We have a Spring Boot app written in Kotlin. The problem is it hangs during Maven clean test while running context load test below. Java: 14.0.1 Kotlin: 1.4.20 Spring boot:2.3.6.RELEASE Spring…
Vahid
  • 1,625
  • 1
  • 18
  • 33
8
votes
1 answer

Connection leak detected by HikariPool LeakDetectionThreshold

I have Hikari Connection Pool, And configured as below HikariConfig hikariConfig = new HikariConfig(); hikariConfig.setJdbcUrl(dbProps.getUrl()); hikariConfig.setUsername(dbProps.getUser()); …
Md Faraz
  • 307
  • 1
  • 4
  • 16
8
votes
1 answer

Play: Restart on code change takes long to shutdown and starting the Hikary Pool

Waiting for the server to restart when working with Play cost us a lot of time. One thing I see in the log is that shutting down and starting the HikaryPool takes a lot of time (> 40 seconds). Here is the log: 2019-10-31 09:11:47,327 [info]…
pme
  • 14,156
  • 3
  • 52
  • 95
8
votes
4 answers

SQLSTATE(08006), ErrorCode(17002) When Using HikariCP JDBC Connection Pool

In our Server we are using scheduler to perform a particular tasks. There are already many scheduler running on the server which are working smoothly and Perfrorming DB Operations without any hurdle. But in below case due to some weird issues, I am…
Jawad Tariq
  • 335
  • 1
  • 3
  • 14
8
votes
1 answer

How to fix "Driver does not support get/set network timeout for connections" while connecting to oracle database from spring boot app?

I was trying to connect to my table and insert some data.We are using oracle database. In the code I have used oracle thin driver ojdbc14.I am getting 2018-12-27 11:08:58.810 INFO 16548 --- [ main] com.zaxxer.hikari.pool.PoolBase …
juneSakura
  • 133
  • 1
  • 1
  • 9
8
votes
2 answers

Spring boot + hikari - dataSource or dataSourceClassName or jdbcUrl is required issue

I get the following error trying to start my Spring application ERROR 5908 --- [ main] com.zaxxer.hikari.HikariConfig : HikariPool-1 - dataSource or dataSourceClassName or jdbcUrl is required. My application.properties file looks…
user2761431
  • 925
  • 2
  • 11
  • 26
8
votes
2 answers

JDBCConnectionException "Unable to acquire JDBC Connection" with spring boot

My Spring Boot works fine when I generate report using Japser report. The problem I face is that the application throws a hibernate exception : Unable to acquire JDBC Connection I get this error after I generate report many times . 1 running…