You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CN OOM during large LOAD DATA and INSERT SELECT S3 writes #24267
A CN can be OOMKilled when running a large LOAD DATA ... PARALLEL 'TRUE' followed by large INSERT ... SELECT copies into tables with wide columns such as vecf32(1024), text, and json.
In one nightly-regression run, the CN restarted shortly after the first copy statement started. The available logs indicate the process RSS crossed the CNFlushS3 soft budget and got very close to the cgroup limit before restart:
The low pinned value compared with the high RSS suggests large S3 write/off-heap memory in the ToWriteS3 path is not sufficiently covered by CNFlushS3 backpressure.
Steps to reproduce the behavior
Create a table containing vecf32(1024), text, json, a primary key, and secondary indexes.
Load a large CSV file using LOAD DATA URL ... PARALLEL 'TRUE'.
Immediately run INSERT INTO copy_table SELECT * FROM source_table one or more times.
Continue with vector/fulltext index creation.
The observed run used a CSV around 15.6 GB and a CN cgroup limit of 55 GiB.
Expected behavior
CN should apply backpressure or flush S3 writer state before RSS approaches the cgroup hard limit. Large load/copy workloads should fail gracefully or run slower instead of being OOMKilled.
Actual behavior
CN RSS grew to about 52.65 GiB with a 55 GiB cgroup limit and the process restarted shortly afterward.
Additional information
The risky path is normal insert.ToWriteS3, used by large LOAD DATA / INSERT SELECT writes. Unlike the multi-update S3 writer delegate, it did not reserve memory through CNMemoryThrottler before feeding batches to CNS3DataWriter.
Activity