/clickhouse-pack:clickhouse-common-errorsfrom clickhouse-pack
Diagnoses and fixes the top 15 ClickHouse errors including query failures, insert problems, memory limits, and merge issues. Use when a ClickHouse query or insert throws an exception or a server-side error appears in logs.
Ships in clickhouse-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Quick reference for the most common ClickHouse errors with real error codes, diagnostic queries, and proven solutions. The three highest-frequency errors are inline below; the full catalog of 10 errors plus system-table diagnostics lives in references/error-reference.md.
clickhouse-client or the
HTTP interface (curl against :8123).system.* introspection tables (system.parts,
system.processes, system.query_log, system.columns, system.replicas).MEMORY_LIMIT_EXCEEDED) and numeric code drive lookup.Follow this loop to turn a raw ClickHouse exception into a verified fix:
Grep to pull the matching line —
Grep for DB::Exception or a specific token like MEMORY_LIMIT_EXCEEDED
across the log to isolate the failure.system.* query (part
count, system.processes, system.query_log) to prove the condition cleared
rather than assuming the fix took.Too Many Parts (Code 252) — hundreds of tiny inserts outpace merges:
-- 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 relief; permanent fix is batching (10K+ rows per INSERT)
ALTER TABLE events MODIFY SETTING parts_to_throw_insert = 1000; -- default 300
Memory Limit Exceeded (Code 241) — query wants more RAM than max_memory_usage:
SET max_memory_usage = 20000000000; -- 20GB for this query, OR
SET max_bytes_before_external_group_by = 10000000000; -- spill big GROUP BY to disk
Syntax Error (Code 62) — most often MySQL habits leaking in:
SELECT "user_id" FROM events; -- double-quote (not `backtick`) identifiers
SELECT * FROM events LIMIT 10 OFFSET 20; -- OFFSET keyword, not LIMIT 10, 20
See references/error-reference.md for Unknown Table, Timeout, DateTime parsing, Readonly, No Such Column, Type Mismatch, and Distributed-table errors.
Working through this skill produces:
SET, ALTER, or corrected SQL to run,
plus whether it is a temporary relief valve or a permanent fix.system.* table confirming the condition
cleared (e.g. part count back under threshold, no query stuck in
system.processes).| Error Code | Name | Category |
|---|---|---|
| 16 | NO_SUCH_COLUMN_IN_TABLE | Schema |
| 60 | UNKNOWN_TABLE | Schema |
| 62 | SYNTAX_ERROR | Query |
| 159 | TIMEOUT_EXCEEDED | Performance |
| 164 | READONLY | Permissions |
| 202 | TOO_MANY_SIMULTANEOUS_QUERIES | Concurrency |
| 241 | MEMORY_LIMIT_EXCEEDED | Resources |
| 252 | TOO_MANY_PARTS | Insert pattern |
If the error name is not in this table, search the raw exception text against the
Error Codes Reference and inspect
system.query_log (WHERE type = 'ExceptionWhileProcessing') for the full
server-side context.
Diagnosing a stalled insert pipeline. Inserts start failing with
Too many parts (600). Classify as code 252 (Insert pattern), run the
system.parts count query to see which table is affected, raise
parts_to_throw_insert for immediate relief, then switch the writer to batched
inserts. Full walkthrough and the other nine errors are in
references/error-reference.md.
Killing a runaway query. A dashboard query hangs. Query system.processes
to find its query_id, then KILL QUERY WHERE query_id = '...'. The complete
set of diagnostic queries (running queries, recent errors, disk usage, merge
health) lives in the Diagnostic Queries section of
references/error-reference.md.
clickhouse-debug-bundle skill.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
24 skills in this plugin
/clickhouse-ci-integrationRun ClickHouse integration tests in CI with GitHub Actions and Docker
containers. Use when setting up automated testing against a real ClickHouse
instance, configuring CI pipelines, or implementing schema validation in CI.
Trigger with "clickhouse CI", "clickhouse GitHub Actions", "clickhouse
integration tests", "test clickhouse in CI", "clickhouse automated testing".
/clickhouse-core-workflow-aDesign ClickHouse schemas with MergeTree engines, ORDER BY keys, and
partitioning.
Use when creating new tables, choosing an engine, designing sort keys, or
modeling data for analytical workloads on ClickHouse or ClickHouse Cloud.
Trigger with "clickhouse schema design", "clickhouse table design",
"clickhouse ORDER BY", "clickhouse partitioning", "MergeTree table".
/clickhouse-core-workflow-bInsert, query, and aggregate data in ClickHouse with real SQL patterns.
Use when writing analytical queries, inserting data at scale, building
dashboards, or implementing materialized views for pre-aggregation.
Trigger with "clickhouse query", "clickhouse insert", "clickhouse aggregate",
"clickhouse materialized view", "clickhouse SQL".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin clickhouse-packOther plugins' skills for the same job