stafftastic / jitsu-chart

MIT License
14 stars 7 forks source link

clickhouse `system` tables are becoming HUGE #52

Open stouch opened 1 week ago

stouch commented 1 week ago

I use jitsu-chart (v1.9.1) and I noticed that all the tables of xxx_log of the system database of the clickhouse pod are becoming HUGE .

For example:

Capture d’écran 2024-11-12 à 13 19 28 Capture d’écran 2024-11-12 à 13 20 07

For now, I must delete there lines manually.

Is there a solution for this ?

stouch commented 3 days ago

Using https://gist.github.com/sanchezzzhak/511fd140e8809857f8f1d84ddb937015?permalink_comment_id=3159885#gistcomment-3159885,

I got this in few weeks with default config of jitsu-charts :

Capture d’écran 2024-11-19 à 14 48 07

For now, as I dont want to manually change config of the chart, I need to sometimes truncate :

TRUNCATE TABLE system.query_log;
TRUNCATE TABLE system.metric_log;
TRUNCATE TABLE system.asynchronous_metric_log;
TRUNCATE TABLE system.trace_log;
echozio commented 1 day ago

This chart only applies minor changes on top of what Bitnami's ClickHouse chart sets by default, and the default subchart provided services' primary purpose is just to provide a minimal working example. They shouldn't be broken or dysfunctional in any way, but their lifecycle won't be managed beyond what Bitnami provides or what's specifically required by Jitsu, as that falls outside the scope of the chart.

Nevertheless, those tables are managed by ClickHouse itself, which by default doesn't clean up anything. It's possible to configure these to either remove rows after some time or disable them all together. Here are some articles that describe how to do that, and some more general information about these tables: https://clickhouse.com/docs/en/operations/system-tables https://kb.altinity.com/altinity-kb-setup-and-maintenance/altinity-kb-system-tables-eat-my-disk/

Whatever configuration changes you want to add can be added to clickhouse.extraOverrides as a string value.

stouch commented 1 day ago

Thanks! I will try to change this part of conf in the chart