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

Slick with Hikari don't use more connections when needed

I'm trying to understand how Slick-Hikari works, I've read a lot of documentation but I've a use case whose behavior I don't understand. I'm using Slick 3 with Hikari, with the default configuration. I already have a production app with ~1000 users…
SergiGP
  • 669
  • 7
  • 17
7
votes
3 answers

HikariConfig and maxPoolSize

I use HikariConfig as DataSource of postgres database on spring server. Should I set up maxPoolSize? (default value is -1) How much pool size can i use? Are there any dependencies with hardware?
7
votes
1 answer

HikariPool-1 - Connection is not available, request timed out after

I'm using HikariCP 2.4.7 for connection pool. Everything is fine just after starting the application but after some time without invoking getConnection() I get this error when I'm trying to getConnection(): java.sql.SQLTransientConnectionException:…
Defozo
  • 2,946
  • 6
  • 32
  • 51
7
votes
1 answer

HikariCP: maxLifetime and idleTimeout with fixed-size pool

I would like to know how maxLifetime and idleTimeout settings behave in a fixed-size Hikari pool. Under which circumstances are connections being retired from a fixed-size pool? And since the pool is fixed-size, is a new connection immediately…
mike
  • 133
  • 1
  • 1
  • 2
7
votes
3 answers

Tomcat: HikariCP issue when deploying two applications with DB connection

I am trying to deploye two WAR files (app1.war and app2.war) on the same tomcat7 instance. I am getting this error : Unable to register MBean [HikariDataSource (HikariPool-0)] with key 'dataSource'; nested exception is…
user1260928
  • 3,269
  • 9
  • 59
  • 105
7
votes
2 answers

how does Hikari recycle connections?

I please you all for an answer I could not find in the HikariCP doc. Given I set the following pool parameters: minimumIdle 1 idleTimeout 10 minutes maxLifeTime 20 minutes When my app stays idle (with nobody making requests) during the night, I…
Gaël Oberson
  • 603
  • 1
  • 5
  • 14
7
votes
1 answer

Connection pool with HikariCP to multiple databases

I am developing a monitoring plugin that queries multiple database. I would like to use HikariCP in order to keep the connection open, but I do not know how the connection pool has to be instantiated. Does HikariCP use just one pool for several…
AngocA
  • 7,655
  • 6
  • 39
  • 55
7
votes
1 answer

How to create new connections and retrieve them later in HikariCP

Would anyone care to elaborate how the HikariCP handles connections in the pool? How do you put a new connection in the pool, and how can you call on it / retrieve it later? This is my current code: HikariConfig config = new HikariConfig(); …
miniHessel
  • 778
  • 4
  • 15
  • 39
7
votes
1 answer

Defining an alternate connection pool in Grails 2.3.6

I know that, at some point between Grails 1.X and Grails 2.X, the default connection pooling library changed from commons-dbcp to tomcat-dbcp. Now, I'm trying to configure either BoneCP or HikariCP as the connection pooling library for my Grails…
Jesús Zazueta
  • 1,160
  • 1
  • 17
  • 32
6
votes
7 answers

Spring Boot application is ignoring hikaricp config

I'm new to stackoverflow, but read tons of posts here and now stuck.my application.properties is read, but the portion for configuring hikaricp is ignored/has no effect. I read https://www.javadevjournal.com/spring-boot/spring-boot-hikari/ and…
6
votes
1 answer

How to configure auto reconnection with hikari in SpringBoot application?

We are using SpringBoot 2.1.x version so Hikari is the default DataSource implementation. However, I am not sure how to configure Hikari settings to auto reconnect to our Oracle database after database maintenance/restart or network connection…
user1747980
  • 245
  • 1
  • 4
  • 14
6
votes
1 answer

HikariCP/Apache DBCP2 and PgBouncer

After switching to PgBouncer in a Spring application that uses HikariCP(or Apache DBCP2) do I need to make additional configuration for HikriCP(or Apache DBCP2) side?
Radu Dumbrăveanu
  • 1,266
  • 1
  • 22
  • 32
6
votes
1 answer

Connection Pooling configuration with HikariCP and AWS Aurora Serverless

I am creating microservices applications using spring boot. All these microservices will connect to a single database AWS Aurora Serverless. I am planning to configure the connection pooling in my applications using HikariCP. Based on my initial…
6
votes
1 answer

HikariCP not closing connections on close() (Connection Leak)

I'm using HikariCP 3.3.1 and PostgreSQL. But I've a problem with closing my connections, in Hikari config I set maximum pool size to 15 and minimum idle connection to 5, but after a few minutes of work with database I've found out connections don't…
Nikita Kalugin
  • 682
  • 2
  • 14
  • 37
6
votes
0 answers

Hikari CP SSL Exception closing inbound before receiving peer's close_notify

Since switching from Tomcat CP (spring boot 1 default) to Hikari (spring boot 2 default) we've started seeing many instances of: EXCEPTION STACK TRACE: ** BEGIN NESTED EXCEPTION ** javax.net.ssl.SSLException MESSAGE: closing inbound before…
David
  • 7,652
  • 21
  • 60
  • 98