| name | clickhouse-rate-limits |
| description | 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".
|
| allowed-tools | Read, Write, Edit |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","database","analytics","clickhouse","olap"] |
| compatible-with | claude-code |
ClickHouse Rate Limits & Concurrency
Overview
ClickHouse does not have REST API rate limits like a SaaS product. Instead, it has
server-side concurrency limits, memory quotas, and per-user settings that control
resource usage. This skill covers how to configure and work within those limits.
Prerequisites
- ClickHouse admin access (or Cloud console)
- Understanding of your concurrency requirements
Instructions
Step 1: Understand Server-Side Limits
| Setting | Default | Description |
|---|
max_concurrent_queries | 100 | Max queries running simultaneously |
max_connections | 4096 | Max TCP/HTTP connections |
max_memory_usage | ~10GB | Per-query memory limit |
max_execution_time | 0 (unlimited) | Per-query timeout in seconds |
max_threads | CPU cores | Threads per query |
ClickHouse Cloud API limit: The Cloud management API (not the query interface)
is limited to 10 requests per 10 seconds.
Step 2: Configure Per-User Quotas
CREATE QUOTA IF NOT EXISTS app_quota
FOR INTERVAL 1 HOUR MAX
queries = 10000,
result_rows = 100000000,
read_rows = 1000000000,
execution_time = 3600
TO app_user;
CREATE SETTINGS PROFILE IF NOT EXISTS app_profile
SETTINGS
max_memory_usage ,
max_execution_time ,
max_threads ,
max_concurrent_queries_for_user
app_user;