Files
meshexplorer/ingest/clickhouse/users.xml
T
Alex Vanderpot 6be73b04a6 clickhouse: lift readonly read-size caps
The readonly profile's max_rows_to_read / max_bytes_to_read (500MB) is exceeded by
the map/stats views, which scan the full (growing) meshcore_packets table -> the web
app failed with TOO_MANY_BYTES. Remove the read-size caps; readonly=1, allow_ddl=0,
max_memory_usage and max_execution_time remain the guardrails.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 01:48:56 -04:00

45 lines
1.9 KiB
XML

<clickhouse>
<users>
<!-- Readonly user configuration. Used by the web UI / discord bot.
Only reachable on the internal docker network, so the password is fine inline. -->
<readonly>
<password>readonly</password>
<networks incl="networks" replace="replace">
<ip>::/0</ip>
</networks>
<profile>readonly</profile>
<quota>default</quota>
</readonly>
</users>
<profiles>
<!-- Disable the query profiler for the default profile so trace_log stays empty
(it otherwise samples every query every 1s -> billions of rows over time). -->
<default>
<query_profiler_real_time_period_ns>0</query_profiler_real_time_period_ns>
<query_profiler_cpu_time_period_ns>0</query_profiler_cpu_time_period_ns>
</default>
<!-- Profile for readonly user -->
<readonly>
<readonly>1</readonly>
<allow_ddl>0</allow_ddl>
<max_memory_usage>10000000000</max_memory_usage>
<max_execution_time>300</max_execution_time>
<!-- No row/byte read caps: the map/stats views scan the full meshcore_packets
table, which grows over time. memory + execution-time limits remain the
guardrails. (0 = unlimited.) -->
<max_rows_to_read>0</max_rows_to_read>
<max_bytes_to_read>0</max_bytes_to_read>
<query_profiler_real_time_period_ns>0</query_profiler_real_time_period_ns>
<query_profiler_cpu_time_period_ns>0</query_profiler_cpu_time_period_ns>
<constraints>
<max_execution_time>
<changeable_in_readonly/>
<min>0</min>
<max>180</max>
</max_execution_time>
</constraints>
</readonly>
</profiles>
</clickhouse>