Skip to content
Tagged articles

keepaliveTime

3 articles · Page 1 of 1
Java Tech Workshop
Java Tech Workshop
Oct 30, 2026 · Databases

HikariCP Connection Pool: Wait Timeout, Leak Detection & Sizing Strategies

This article analyzes HikariCP connection pool timeout and leak issues through a production incident, explaining connectionTimeout behavior, leakDetectionThreshold mechanics, pool sizing formulas, transaction scope impact on connection hold time, maxLifetime and keepaliveTime configuration for network infrastructure, and practical troubleshooting using thread dumps and pool metrics.

HikariCPconnection poolconnectionTimeout
0 likes · 24 min read
HikariCP Connection Pool: Wait Timeout, Leak Detection & Sizing Strategies
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 8, 2025 · Backend Development

Why Java ThreadPoolExecutor’s Core Threads Aren’t Recycled by Default

In Java’s ThreadPoolExecutor, core threads remain alive even when idle unless the allowCoreThreadTimeOut flag is set to true, which then permits both core and non‑core threads to be reclaimed after exceeding the keepAliveTime threshold, a behavior that contradicts the pool’s design principle of minimizing thread creation overhead.

ConcurrencyJavaThreadPoolExecutor
0 likes · 2 min read
Why Java ThreadPoolExecutor’s Core Threads Aren’t Recycled by Default
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 4, 2021 · Backend Development

Understanding ThreadPoolExecutor keepAliveTime=0 in Java

This article clarifies that setting keepAliveTime to 0 in a Java ThreadPoolExecutor causes excess idle threads beyond corePoolSize to terminate immediately, correcting the common misconception that 0 means threads live forever, and demonstrates the behavior with a concise code example.

ConcurrencyExecutorServiceJava
0 likes · 4 min read
Understanding ThreadPoolExecutor keepAliveTime=0 in Java