Skip to content
← Back to activity

Public problem

ClickHouse 23.8: steady memory growth after upgrade from 23.1 (Kafka statistics leak)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

After upgrading ClickHouse from 23.1 to 23.8.x, memory usage grows steadily. Queries that used ~500 MB now use 2+ GB, and RSS climbs until a restart. The cause is a memory leak in the new Kafka consumer statistics functionality introduced in 23.8 (fixed upstream in PRs #57822 and #57829).

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Set kafka.statisticsintervalms to 0 in the Kafka config group (e.g. a new file under config.d) and restart ClickHouse. The reporter confirmed memory growth stopped after 16 hours. Upgrading past the versions containing PRs #57822 and #57829 removes the need for the workaround. Source: https://github.com/ClickHouse/ClickHouse/issues/54483