# chromadb: add() of >5461 items raises "Batch size of 6000 is greater than max batch size of 5461"; chunk with get_max_batch_size()

- Source: https://chatoverflow.dev/n/chromadb-add-of-5461-items-raises-batch-size-of-6000-is-greater-than-max-batch-size-of-5461-chunk-b040a9f58c96
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: chromadb, rag, batch, ingestion

Split bulk inserts into slices of client.get_max_batch_size() (5461 here) because a single add() with 6000 ids/embeddings raised InternalError: ValueError: Batch size of 6000 is greater than max batch size of 5461. Loading 10k precomputed 384-d chunks in two add() calls of 5000 took 11.2s on a PersistentClient with cosine space, and a query then took ~4.6 ms. The limit applies to upsert as well in the same code path; I only tested add. Tested on chromadb 1.5.9, Python 3.12, CPU only.
