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

HikariCP too many connections

i have a Java Servlet and i want to use connection pooling together with jdbc (Database: mysql). So here is what i'm doing: (This class is public final class DBConnector) private static final HikariDataSource dataSource = new…
Fabian Lurz
  • 2,029
  • 6
  • 26
  • 52
16
votes
6 answers

HikariPool-1 - Exception during pool initialization

I'm deploying Spring-Boot4 project and I have got an error called HikariPool-1 - Exception during pool initialization. 2019-07-05 11:29:43.600 INFO 5084 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core…
INDRAJITH EKANAYAKE
  • 3,894
  • 11
  • 41
  • 63
16
votes
11 answers

Spring boot "Hikari Pool Shutdown" early error

ERROR: 2018-11-12 18:25:31.221 INFO 3028 --- [ Thread-3] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2018-11-12 18:25:31.223 INFO 3028 --- [ Thread-3] com.zaxxer.hikari.HikariDataSource :…
Shale
  • 338
  • 1
  • 2
  • 10
16
votes
2 answers

Hikari: Failed to validate connection because connection is closed

I'm using hikari pool connection through play framework and mariadb client and since I've updated them (play 2.6.5 -> 2.6.6 and mariadb 2.1.1 -> 2.1.2 but not sure it's related) regularly I've got the following error: HikariPool-1 - Failed to…
Maxence Cramet
  • 552
  • 1
  • 5
  • 17
16
votes
3 answers

Configure HikariCP in Spring Boot with JTDS

I want to add a connection pool to my existing web application, which has been made using Spring Boot 1.5.1. The datasource configuration is made in application.properties as…
joninx
  • 1,775
  • 6
  • 31
  • 59
16
votes
1 answer

HikariCP multithreading separate connection for each thread

To the folks of the stackoverflow community. I was looking for some help with an issue i am facing with HikariCP connection pooling. High level: I am trying to create several threads using a thread pool and my plan is to give each worker thread its…
14
votes
3 answers

testcontainers, hikari and Failed to validate connection org.postgresql.jdbc.PgConnection

I have a spring boot app. I'm testing it with testcontainers to ensure that the DB (postgres) and the Repository implementation do what they are supposed to do. I initialise the container with the following and works pretty well. @Container …
davide
  • 232
  • 2
  • 7
14
votes
1 answer

How do I properly close a HikariCP Connection Pool

I'm using HikariDataSource to connect to a MariaDB database. The following class returns a Connection. public class DataSource { private HikariDataSource ds; // The constructor takes db name as an argument and creates a new datasource for the…
Roshan Upreti
  • 1,782
  • 3
  • 21
  • 34
14
votes
1 answer

implementing hikaricp with microsoft sql server

I am trying to figure out the best approach for using hikaricp (JDBC connection pool) with microsoft sql server. From what I saw, the DataSource option is recommended (as is the case for most connection pools I've seen). However, I was not able to…
user3813256
14
votes
2 answers

How to configure datasource with HikariCP in Spring @Configuration class?

I'm trying to configure HikariCP datasource in Spring @Configuration class[Database being oracle]. But it's not working. I searched in the internet and found that HikariCP datasource needs to be configured with constructor. I have tried this [the…
Abhinab Kanrar
  • 1,532
  • 2
  • 20
  • 46
13
votes
1 answer

Connection timeouts with HikariCP

I have a Spring Boot (v2.0.8) application which makes use of a HikariCP (v2.7.9) Pool (connecting to MariaDB) configured with: minimumIdle: 1 maximumPoolSize: 10 leakDetectionThreshold: 30000 The issue is that our production component, once every…
sam
  • 2,469
  • 8
  • 37
  • 57
13
votes
5 answers

Is "Tomcat 7 JDBC Connection Pool" good enough for production? And how is it compare to BoneCP?

Our site get roughly 1M pv/day, and we use Tomcat for sure. I couldn't find much information about jdbc-pool, not sure if it's stable enough for production. Anyone got experience on it? and any configuration/tuning stuff for reference? As someone…
BigFatSea
  • 473
  • 1
  • 6
  • 13
12
votes
3 answers

How to configure hikari pool for eager initialization?

I want to configure the Hikari pool to eagerly initialize on application startup and not when first query is issued. As of now spring initializr project shows that hikari pool is provisioned on first query. To reproduce issue - Create spring…
mindhunt3r
  • 181
  • 2
  • 10
12
votes
2 answers

HikariPool-1 - Failed to validate connection org.postgresql.jdbc.PgConnection@2a84e649 (This connection has been closed.)

I'm using Postgresql and spring boot 2.0.4. The below error is thrown when trying to execute the queries one after the other. I've executed the following query, and the count keeps on increasing. SELECT COUNT(*) FROM pg_stat_activity WHERE state…
nidhi
  • 299
  • 3
  • 4
  • 21
12
votes
1 answer

Reset (autoCommit) on connection in HikariCP

I keep seeing this log when I use connections in Hikari pool. [com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314 [com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset…
Bee
  • 12,251
  • 11
  • 46
  • 73
1 2
3
91 92