Commit 0e68bb0
fix(clickhouse-ec2): disable text_log and lower log level in provisioning
Stock ClickHouse ships at `trace` log level with system.text_log enabled
and no TTL. On the hosted instance text_log grew ~155 GiB in ~2 days and
filled the data volume, after which every INSERT failed with
NOT_ENOUGH_SPACE (Code 243) — query_token/query_log writes from the query
service were blocked; reads were unaffected.
The running server was fixed by hand, but that fix lived only in the
container's writable layer because config.d was never bind-mounted, so it
would not survive an image bump or instance replacement. Bake it into
user-data instead, mirroring the existing users.d pattern:
- Write /etc/clickhouse-server/config.d/quiet-logs.xml setting the logger
level to `information` and removing text_log.
- Bind-mount config.d (:ro) into the container so the override is applied.
- chown 101:101 so the container's clickhouse uid can read it (no secrets,
so no chmod 600 like admin.xml).
System-log table TTLs (system.query_log etc.) are applied separately via
SQL; they persist on the preserved EBS data volume.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 4532237 commit 0e68bb0
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
67 | 88 | | |
68 | 89 | | |
69 | 90 | | |
| |||
76 | 97 | | |
77 | 98 | | |
78 | 99 | | |
| 100 | + | |
79 | 101 | | |
0 commit comments