Fix ClickHouse OOM on batch insert: reduce batch size, increase memory
Execution rows are wide (29 cols with serialized arrays/JSON), so 500 rows can exceed ClickHouse's memory limit. Reduce default batch size from 500 to 100 and bump ClickHouse memory limit from 2Gi to 4Gi. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||||||
public class IngestionConfig {
|
public class IngestionConfig {
|
||||||
|
|
||||||
private int bufferCapacity = 50_000;
|
private int bufferCapacity = 50_000;
|
||||||
private int batchSize = 500;
|
private int batchSize = 100;
|
||||||
private long flushIntervalMs = 1_000;
|
private long flushIntervalMs = 1_000;
|
||||||
|
|
||||||
public int getBufferCapacity() {
|
public int getBufferCapacity() {
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ spec:
|
|||||||
mountPath: /var/lib/clickhouse
|
mountPath: /var/lib/clickhouse
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "512Mi"
|
memory: "1Gi"
|
||||||
cpu: "200m"
|
cpu: "200m"
|
||||||
limits:
|
limits:
|
||||||
memory: "2Gi"
|
memory: "4Gi"
|
||||||
cpu: "1000m"
|
cpu: "1000m"
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
|
|||||||
Reference in New Issue
Block a user