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,266 stars 315 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
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

clickhouse-debug-bundle

Collect ClickHouse diagnostic data — system tables, query logs, merge status, and server metrics for support tickets and troubleshooting. Use when investigating persistent issues, preparing debug artifacts, or collecting evidence for ClickHouse support. Trigger: "clickhouse debug", "clickhouse diagnostics", "clickhouse support bundle", "collect clickhouse logs", "clickhouse system tables".

2,266 Updated today
jeremylongshore
AI & Automation Featured

clickhouse-rate-limits

Configure ClickHouse query concurrency, memory quotas, and connection limits. Use when hitting "too many simultaneous queries", managing concurrent users, or tuning server-side resource limits. Trigger: "clickhouse rate limit", "clickhouse concurrency", "clickhouse quota", "too many simultaneous queries", "clickhouse connection limit".

2,266 Updated today
jeremylongshore
AI & Automation Featured

clickhouse-performance-tuning

Optimize ClickHouse query performance with indexing, projections, settings tuning, and query analysis using system tables. Use when queries are slow, investigating performance bottlenecks, or tuning ClickHouse server settings. Trigger: "clickhouse performance", "optimize clickhouse query", "clickhouse slow query", "clickhouse indexing", "clickhouse tuning", "clickhouse projections".

2,266 Updated today
jeremylongshore
Data & Documents Listed

clickhouse-io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

0 Updated today
Izangi2714
AI & Automation Solid

clickhouse-io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

495 Updated 1 months ago
vibeeval