Inserting batches of data into CockroachDB results in a maximum allowed size error

Viewed 21

I was inserting batches of data into CockroachDB, multi-batches (up to 10) in a single transaction. After a couple of batches the insert failed with “message size 50 MiB bigger than maximum allowed message size 16 MiB”, which is correct, this batch contained a record with outsized ‘string’. I added a line to the transaction to update the max_read_buffer_size cluster setting to 100 MiB. But I'm still getting the error.

1 Answers

max_read_buffer_size is a cluster setting. Cluster settings cannot be set inside a transaction. Make sure you update the setting outside of the transaction.

Related