Author Archives: Stanislav_Panteleev

Java.HikaryCP.When i close connection in my code, does connection returns to pool ?

✅ When you close a connection in your code, does the connection return to the pool? Answer:Yes — that’s exactly how connection pooling works. 🔹 How it works in HikariCP (and other connection pools): When you call connection.close() on a … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikaryCP.When i close connection in my code, does connection returns to pool ?

Java.HikaryCP.How can HikariCP help identify slow queries or mismanaged connections?

✅ How can HikariCP help identify slow queries or mismanaged connections? Answer:HikariCP provides two main mechanisms to help you identify slow queries and mismanaged (unclosed) connections, both of which can exhaust your connection pool and degrade performance: 🔹 1. Leak … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikaryCP.How can HikariCP help identify slow queries or mismanaged connections?

Java.HikariCP.Does pool always keep minimum idle connections, and all connections above are closed after idleTime ?

✅ Does the pool always keep minimumIdle connections, and are connections above minimumIdle closed after idleTimeout? Answer:Yes — that’s exactly how it works: 🔹 HikariCP’s idle connection management works like this: The pool tries to maintain at least minimumIdle connections … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikariCP.Does pool always keep minimum idle connections, and all connections above are closed after idleTime ?

Java.HikariCP.What are some tuning strategies for HikariCP in high-concurrency environments?

✅ What are some tuning strategies for HikariCP in high-concurrency environments? Answer:When your application experiences high concurrency — i.e., many simultaneous database requests — you need to carefully tune HikariCP to avoid bottlenecks or resource exhaustion. Here are key strategies: … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikariCP.What are some tuning strategies for HikariCP in high-concurrency environments?

Java.HikariCP.Explain the role of keepaliveTime and when to use it

Answer:🔹 What is keepaliveTime?The keepaliveTime setting in HikariCP specifies how often idle connections should be proactively pinged (validated) to keep them alive. If a connection sits idle longer than keepaliveTime, HikariCP will run a lightweight validation (using isValid() or your … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikariCP.Explain the role of keepaliveTime and when to use it

Java.HikariCP.How does HikariCP validate that a connection is alive before giving it to the application?

HikariCP validates a connection before handing it to your application using a connection test query or JDBC-standard connection validation methods, depending on your configuration: 🔹 1. Connection test query (connectionTestQuery)You can explicitly set a lightweight SQL statement (e.g., SELECT 1) … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikariCP.How does HikariCP validate that a connection is alive before giving it to the application?

Java.HikaryCP.How can you monitor HikariCP metrics in a production environment?

You can monitor HikariCP metrics in several ways, depending on your tech stack: 🔹 1. Built-in JMX SupportHikariCP exposes key metrics through JMX, which you can consume with tools like JConsole, VisualVM, or monitoring solutions that support JMX (e.g., Prometheus … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikaryCP.How can you monitor HikariCP metrics in a production environment?

Java.HikaryCP.What is the purpose of leakDetectionThreshold and when should you use it?

Purpose:The leakDetectionThreshold setting in HikariCP helps detect connection leaks — cases when your application borrows a connection from the pool but forgets to close it.If a connection remains open (checked out) longer than the configured threshold, HikariCP logs a stack … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikaryCP.What is the purpose of leakDetectionThreshold and when should you use it?

Java.HikariCP.What is the use of idleTimeout and how can it affect performance?

Purpose:The idleTimeout property in HikariCP specifies how long an idle connection can stay in the pool before it’s closed. Essentially, it controls when unused connections are retired to reduce resource usage (e.g., DB connections, memory). Default:By default, idleTimeout is set … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikariCP.What is the use of idleTimeout and how can it affect performance?

Java.HikariCP.Where do you typically define HikariCP settings in a Spring Boot project?

In a Spring Boot project, you typically define HikariCP settings in the application.properties or application.yml file. Spring Boot auto-configures HikariCP as the default connection pool if it’s on the classpath, and you can customize it by adding properties with the … Continue reading →

Posted in Без рубрики | Comments Off on Java.HikariCP.Where do you typically define HikariCP settings in a Spring Boot project?