clickhouse-common-errors

Featured

Diagnose and fix the top 15 ClickHouse errors — query failures, insert problems, memory limits, and merge issues. Use when encountering ClickHouse exceptions, debugging failed queries, or troubleshooting server-side errors. Trigger: "clickhouse error", "fix clickhouse", "clickhouse not working", "debug clickhouse", "clickhouse exception", "clickhouse syntax error".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# ClickHouse Common Errors ## Overview Quick reference for the most common ClickHouse errors with real error codes, diagnostic queries, and proven solutions. ## Prerequisites - Access to ClickHouse (client or HTTP interface) - Ability to query `system.*` tables ## Error Reference ### 1. Too Many Parts (Code 252) ``` DB::Exception: Too many parts (600). Merges are processing significantly slower than inserts. ``` **Cause:** Each INSERT creates a new data part. Hundreds of tiny inserts per second overwhelm the merge process. **Fix:** ```sql -- Check current part count per table SELECT database, table, count() AS part_count FROM system.parts WHERE active GROUP BY database, table ORDER BY part_count DESC; -- Temporary: raise the limit ALTER TABLE events MODIFY SETTING parts_to_throw_insert = 1000; -- Permanent: batch your inserts (10K+ rows per INSERT) -- See clickhouse-sdk-patterns for batching code ``` ### 2. Memory Limit Exceeded (Code 241) ``` DB::Exception: Memory limit (for query) exceeded: ... (MEMORY_LIMIT_EXCEEDED) ``` **Cause:** Query allocates more RAM than `max_memory_usage` (default ~10GB). **Fix:** ```sql -- Check what's consuming memory SELECT query, memory_usage, peak_memory_usage FROM system.processes ORDER BY peak_memory_usage DESC; -- Option A: Increase limit for this query SET max_memory_usage = 20000000000; -- 20GB -- Option B: Reduce data scanned SELECT ... FROM events WHERE created_at >= today() - 7 -- Add time filters LIMIT 10000; ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category