fix: raise local ClickHouse memory and concurrency limits#1905
Merged
Conversation
The overly restrictive local dev limits (1 GB server memory, 512 MB per query, 2 concurrent queries per user) caused telemetry inserts to be silently dropped. The JSON column type used by telemetry_logs is memory-intensive, and concurrent inserts that trigger materialized views would exceed the memory ceiling — ClickHouse would silently discard the data while returning success to the client. - Set max_server_memory_usage to 0 (auto = 90% of container RAM) - Set per-query and per-user memory limits to 0 (bounded by server cap) - Raise concurrent query limits from 2/4 to 30/30
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
disintegrator
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I found that when testing our telemetry logs locally some tool call logs were not showing up. I believe this to be a resource issue due to the generation of materliazed clickhouse views. After I changed these params the logs were working as expected.
JSONcolumn type used bytelemetry_logsis memory-intensive, and concurrent inserts triggering materialized views would exceed the 1 GB server memory cap — ClickHouse silently discards data while returning success to the clientChanges
max_server_memory_usageconfig.d/limits.xmlmax_memory_usage(per query)users.d/dev_profile.xmlmax_memory_usage_for_userusers.d/dev_profile.xmlmax_concurrent_queries_for_userusers.d/dev_profile.xmlmax_concurrent_queries_for_all_usersusers.d/dev_profile.xmlAfter applying, rebuild the ClickHouse container:
docker compose build clickhouse && docker compose up -d clickhouse