Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clickhouse system tables are becoming HUGE #52

Open
stouch opened this issue Nov 12, 2024 · 3 comments
Open

clickhouse system tables are becoming HUGE #52

stouch opened this issue Nov 12, 2024 · 3 comments

Comments

@stouch
Copy link

stouch commented Nov 12, 2024

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
Copy link
Author

stouch commented Nov 19, 2024

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;
TRUNCATE TABLE system.part_log;

@echozio
Copy link
Contributor

echozio commented Nov 20, 2024

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
Copy link
Author

stouch commented Nov 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants