improve ch config

This commit is contained in:
ruslandoga 2024-09-13 13:52:58 +07:00
parent 183235465b
commit 9bdc8c577a
3 changed files with 3 additions and 33 deletions

View File

@ -1,23 +0,0 @@
<clickhouse>
<logger>
<level>warning</level>
<console>true</console>
</logger>
<!--
Avoid the warning: "Listen [::]:9009 failed: Address family for hostname not supported".
If Docker has IPv6 disabled, bind ClickHouse to IPv4 to prevent this issue.
Add this to the configuration to ensure it listens on all IPv4 interfaces:
<listen_host>0.0.0.0</listen_host>
-->
<!-- Stop all the unnecessary logging -->
<query_thread_log remove="remove"/>
<query_log remove="remove"/>
<text_log remove="remove"/>
<trace_log remove="remove"/>
<metric_log remove="remove"/>
<asynchronous_metric_log remove="remove"/>
<session_log remove="remove"/>
<part_log remove="remove"/>
</clickhouse>

View File

@ -1,8 +0,0 @@
<clickhouse>
<profiles>
<default>
<log_queries>0</log_queries>
<log_query_threads>0</log_query_threads>
</default>
</profiles>
</clickhouse>

View File

@ -17,8 +17,9 @@ services:
volumes: volumes:
- event-data:/var/lib/clickhouse - event-data:/var/lib/clickhouse
- event-logs:/var/log/clickhouse-server - event-logs:/var/log/clickhouse-server
- ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro - ./clickhouse/logs.xml:/etc/clickhouse-server/config.d/logs.xml:ro
- ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro # This makes ClickHouse bind to IPv4 only, since Docker doesn't support IPv6 by default.
- ./clickhouse/ipv4.xml:/etc/clickhouse-server/config.d/ipv4.xml:ro
ulimits: ulimits:
nofile: nofile:
soft: 262144 soft: 262144