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

trying to find db connection leak in my code, using Spring / JPA / Hikari

I've got a problem with a Spring web application that periodically runs into an error fetching a connection from my connection pool. Eventually in the logs I see entries like: Caused by: javax.persistence.PersistenceException:…
Thomas Feiler
  • 295
  • 4
  • 11
8
votes
1 answer

Using HikariCP's connection pool the correct way

I been trying to develop a Minecraft server plugin where a player enters a command with some data, data is sent to database, or, a command that requests some data from database. It's working, until a user starts using it more then a few times. I get…
kinx
  • 463
  • 5
  • 12
  • 31
8
votes
3 answers

How to use JMX MBean for HikariCP in Spring boot application?

How to use JMX MBean for HikariCP in Spring boot application? I have a code like this: @SpringBootApplication public class App() { ... } And other class: @Configuration public class DatabaseCfg() { @Bean @ManagedOperation public DataSource ds…
BlackJonnie
  • 81
  • 1
  • 1
  • 4
8
votes
4 answers

Spring Boot/HikariCP @Transactional not overwriting isolation level

My application is experiencing lock contentions on one of our heavily-trafficked tables in our SQL Server database. I have been advised by our DBA team to follow other teams' configuration, which have their default transaction isolation level set to…
therrin150
  • 247
  • 2
  • 4
  • 7
8
votes
1 answer

HikariCP: SELECT queries execute roll back due to dirty commit state on close()

I am trying to use HikarCP in a legacy system. I configured autocommit to false, which is what we want, and realized that my logs are filled with [c.z.h.p.ProxyConnection][ProxyConnection.java:232] ora - Executed rollback on connection…
NaveenBabuE
  • 706
  • 4
  • 7
  • 26
7
votes
1 answer

Getting subsequent connections using HikariCP during same request seems slow

I have a Spring boot app that use HikariCP for Postgres connection pooling. Recently I've set up tracing to collect some data how time is spent when handling a request to a specific endpoint. My assumptions are that when using HikariCP: The first…
edwardmp
  • 6,339
  • 5
  • 50
  • 77
7
votes
1 answer

Connections are not closed and piling up when running @SpringBootTest classes

We have Spring Boot integration tests, and keep writing new ones regularly. I noticed database connections have been piling up: the more tests I run, the higher the connection peak to my PostgreSQL instance. It reached a point where there are more…
Cécile Fecherolle
  • 1,695
  • 3
  • 15
  • 32
7
votes
1 answer

Should I use Oracle's UCP or HikariCP for a modern application?

Which one should I use for a modern backend Java application using Oracle OLTP database as a datasource? To me HikariCP looks like a de-facto standard pool for a modern Java application. But now I need to maintain some project from the past, which…
Kirill
  • 6,762
  • 4
  • 51
  • 81
7
votes
2 answers

Hibernate slow sql not logged

Problem with logging sql statement wrapped with Hikari. I have hibernate property: hibernate.session.events.log.LOG_QUERIES_SLOWER_THAN_MS=50 logging.level.org.hibernate.SQL_SLOW" level="info but in log I get only class names instead of…
Shakirov Ramil
  • 1,381
  • 9
  • 13
7
votes
1 answer

Connections not being closed(HikariCP, Postgres)

Env Spring Boot 2.1.2. 2 environments: local(postgres 11) and qa (docker swarm with postgres 10 and application) Problem After maxLifetime passes, hikari recreates connections(closes old ones and creating new ones), but on qa environment…
Flame239
  • 1,274
  • 1
  • 8
  • 20
7
votes
1 answer

Need generic solution for Spring based app for any Data source on Password expire

I don't know, how to approach a solution for the following scenario. We have a new requirement to remove DB Password from properties even though it's encrypted with Jasypt library or some other algorithms. Instead of storing the password in…
Viraj
  • 1,360
  • 3
  • 18
  • 38
7
votes
2 answers

Spring Boot 2 Upgrade with JPA Failed to instantiate [com.zaxxer.hikari.HikariDataSource]

I'm upgrading to Spring Boot 2.0.1.RELEASE, using Spring data JPA with Eclipselink as my provider and Liquibase. I'm encountering the following error trying to start the server: org.springframework.beans.factory.BeanCreationException: Error creating…
user3288756
  • 107
  • 1
  • 2
  • 6
7
votes
1 answer

Connection is not available, request timed out after 30003ms

I'm getting this exception for last few days. This problem occurs when I process 10++ form and connection keep on increasing every 30 seconds to 1 minute 30 seconds until reach max size. I've ensure all connection already close. Why am I keep…
user9695387
7
votes
5 answers

spring boot application showing ??? characters instead of unicode

While reading from database the logs in my dao class shows junk characters in place of unicode characters. Sql developer shows correct values from oracle database also correct NLS language encoding is set on the database. Below code works for…
Ayub
  • 599
  • 3
  • 10
  • 24
7
votes
2 answers

How to get the number of Active Connections for HikariCP

I was trying to log the number of current active connections. I am using com.zaxxer.hikari.HikariJNDIFactory as my data source factory. final Context context = new InitialContext(); HikariConfig hikariConfig = new…
Vikranth
  • 71
  • 1
  • 1
  • 2