The active-count query scanned all wide rows on the base table, exceeding the 3.6 GiB memory limit. Use PREWHERE status = 'RUNNING' so ClickHouse reads only the status column first. Add SETTINGS max_memory_usage = 1 GiB to all queries so concurrent requests degrade gracefully instead of crashing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>