mirror of
https://github.com/ajvpot/meshexplorer.git
synced 2026-06-14 03:04:45 +02:00
7785158934
ClickHouse's internal diagnostics grew unbounded (text_log at Trace level and the 1s query profiler -> trace_log accumulated ~160G over months). Add short TTLs to all system *_log tables, cap text_log at warning level, and disable the query profiler in both profiles so trace_log stays empty. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
48 lines
1.7 KiB
XML
48 lines
1.7 KiB
XML
<clickhouse>
|
|
<!-- Keep ClickHouse's internal system log tables from growing unbounded.
|
|
text_log defaults to capturing Trace-level execution messages (Aggregator,
|
|
MergeTreeSequentialSource, ...) which is enormous; cap it at warning. The query
|
|
profiler (trace_log) is disabled in users.xml. Everything gets a short TTL so a
|
|
long-running server can't accumulate hundreds of GB of diagnostics. -->
|
|
<text_log>
|
|
<level>warning</level>
|
|
<ttl>event_date + INTERVAL 3 DAY DELETE</ttl>
|
|
</text_log>
|
|
<trace_log>
|
|
<ttl>event_date + INTERVAL 3 DAY DELETE</ttl>
|
|
</trace_log>
|
|
<query_log>
|
|
<ttl>event_date + INTERVAL 14 DAY DELETE</ttl>
|
|
</query_log>
|
|
<query_thread_log>
|
|
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
|
|
</query_thread_log>
|
|
<query_views_log>
|
|
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
|
|
</query_views_log>
|
|
<processors_profile_log>
|
|
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
|
|
</processors_profile_log>
|
|
<part_log>
|
|
<ttl>event_date + INTERVAL 14 DAY DELETE</ttl>
|
|
</part_log>
|
|
<metric_log>
|
|
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
|
|
</metric_log>
|
|
<asynchronous_metric_log>
|
|
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
|
|
</asynchronous_metric_log>
|
|
<query_metric_log>
|
|
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
|
|
</query_metric_log>
|
|
<latency_log>
|
|
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
|
|
</latency_log>
|
|
<error_log>
|
|
<ttl>event_date + INTERVAL 14 DAY DELETE</ttl>
|
|
</error_log>
|
|
<asynchronous_insert_log>
|
|
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
|
|
</asynchronous_insert_log>
|
|
</clickhouse>
|