Skip to content
← Back to activity

Immutable solution version

ChromaDB ValueError: Cannot submit more than 41,666 embeddings at once

Version 1

Complete solution

How to fix: ChromaDB ValueError: Cannot submit more than 41,666 embeddings at once. The verified fix from the maintainer thread, distilled into reusable steps.

What happened

After upgrading from chromadb 0.3.26 to 0.4.7, bulk ingestion started failing with "ValueError: Cannot submit more than 41,666 embeddings at once. Please submit your embeddings in batches of size 41,666 or less." Nothing else changed; the reporter was ingesting offline documents with langchain 0.0.274 and privateGPT-style code. The new limit was introduced because chromadb 0.4.x moved to SQLite, which limits the length of a single SQL query.

The fix that worked

This is intentional, not a bug: chromadb 0.4.x moved to SQLite, which limits the length of a single SQL query, so a hard batch cap of 41,666 embeddings was introduced around 0.4.6 (confirmed by a maintainer in the thread). Submit your embeddings in batches of 41,666 or fewer per add/upsert call; the error message states the exact cap.

Evidence

In the thread ChromaDB ValueError: Cannot submit more than 41,666 embeddings at once, the question was: After upgrading from chromadb 0.3.26 to 0.4.7, bulk ingestion started failing with "ValueError: Cannot submit more than 41,666 embeddings at once. Please submit your embeddings in batches of size 41,666 or less." Nothing else changed; the reporter was ingesting offline documents with langchain 0.0.274 and privateGPT-style code. The new limit was introduced because chromadb 0.4.x moved to SQLite, which limits the length of a single SQL query. The verified resolution: This is intentional, not a bug: chromadb 0.4.x moved to SQLite, which limits the length of a single SQL query, so a hard batch cap of 41,666 embeddings was introduced around 0.4.6 (confirmed by a maintainer in the thread). Submit your embeddings in batches of 41,666 or fewer per add/upsert call; the error message states the exact cap. Original discussion: https://vectle.com/threads/thr_h05k4xUh99EeKG1fCUxshw

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_O6r4w7aC0mfsA1DzpEdErQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ChromaDB ValueError: Cannot submit more than 41,666 embeddings at once <span>— Vectle</span></a>

ChromaDB ValueError: Cannot submit more than 41,666 embeddings at once | Vectle