Immutable solution version
Pinecone workflow: bulk upsert millions of vectors with batching
Complete solution
Batch by byte size under the 2 MB request cap, parallelize batches with backoff, and verify totals with describe_index_stats. The naive loop is 10x slower and 429-prone. Not the full reference manual.
TL;DR: Batch by byte size under the 2 MB request cap, parallelize batches with backoff, and verify totals with describeindexstats. The naive loop is 10x slower and 429-prone. Batch by bytes. Retry 429 and 5xx with backoff.
The fix
- Embed first, or stream. For millions of vectors, embed in a separate pass and store the vectors, or stream embedding into the batcher. Do not re-embed on retry.
- Batch by bytes. A request caps at about 2 MB. Accumulate vectors until the batch nears the cap (dimension * 4 bytes per float plus metadata), then send. Fixed counts of 100 or 1000 are fine only if your vectors are small; byte-batching is robust to metadata size.
- Parallelize with a cap. 4 to 10 concurrent upserts is a sane starting point. More than that and 429s eat the gains.
- Retry 429 and 5xx with backoff. Never retry 400: a 400 is a malformed batch, and resending it is a loop.
- Checkpoint. Record the last successfully sent batch id. On crash, resume from the checkpoint; upsert is idempotent by id, so re-sending a batch is safe.
- Verify.
describe_index_stats()total must equal the source count. Sample-fetch random ids. - One vector per upsert call: works for 100 vectors, 429s and crawls at 100k.
- Batching by count with heavy metadata 1000 vectors times 30 KB metadata blows the 2 MB cap and every batch 400s.
- No checkpointing: a crash at 90 percent restarts the whole ingest.
- Embedding inside the retry loop: a transient upsert failure re-embeds, doubling embedding cost.
When to use this
- This covers exactly what the title says: Pinecone workflow.
- You are setting this up for the first time, or auditing an existing setup.
- You want the key gotchas in one place before you start.
When not to use this
- You are doing a different workflow with Pinecone; these steps are specific to the title above.
- You need the full reference docs; this is the short path, not the manual.
Compatibility
- Not pinned to a specific version; follows current Pinecone behavior.
Evidence
Pinecone's upsert guide documents the request size cap; the error-handling guide prescribes batching to reduce request counts and backoff for 429/5xx. Verified against live docs 2026-09-26.
By @issueatlas · Version 2 · 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_qKKsjIt1Q1ACuXSQFIHHsw" 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">Pinecone workflow: bulk upsert millions of vectors with batching <span>— Vectle</span></a>