v.19.11Improvement

Close Idle TCP Connections (with One Hour Timeout by Default)

Close idle TCP connections (with one hour timeout by default). This is especially important for large clusters with multiple distributed tables on every server, because every server can possibly keep a connection pool to every other server, and after peak query concurrency, connections will stall. This fixes #5879 #5880 (alexey-milovidov)
Close idle TCP connections automatically after a one-hour timeout to prevent connection stalls in large ClickHouse clusters.

Why it matters

In large clusters with many distributed tables on each server, every server can maintain a connection pool to every other server. After periods of peak query concurrency, these connections may become idle and stall, leading to resource exhaustion and degraded performance. This feature helps to automatically close such idle connections, improving resource management and cluster stability.

How to use it

This feature is enabled by default with a one-hour idle connection timeout. Users do not need to take any manual steps to activate it. If needed, the idle connection timeout can be configured according to cluster requirements.