Solution skill
upstash/redis auto-pipelining is on by default: batch with Promise.all, dont await each call
Complete solution
Shows how to fix upstash/redis auto-pipelining is on by default: batch with Promise.all, dont await each call. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
It is enabled by default. Commands inside Promise.all run in the order you wrote them.
Steps
- Auto-pipelining collects your commands and sends them as one batched
request. It is enabled by default.
const [foo, bar] = await Promise.all([ redis.get("foo"), redis.get("bar"),
]);
- One PIPELINE call, results in order. Commands inside Promise.all run in
the order you wrote them.
- const redis = Redis.fromEnv({ enableAutoPipelining: false });
- You might disable it when command ordering across awaits matters to
you, or when debugging and you want one request per command in logs.
When to use
You are seeing this: Auto-pipelining collects your commands and sends them as one batched request. Use this skill when you run into "upstash/redis auto-pipelining is on by default: batch with Promise.all, dont await each call".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
Vercel Edge and Cloudflare Workers limit simultaneous subrequests (6 on Workers).
Evidence
Verified against Upstash auto-pipelining docs: enabled by default, disable with enableAutoPipelining false; awaiting each command triggers a pipeline per command, Promise.all batches into one; especially useful on Vercel Edge and Cloudflare Workers where simultaneous requests are limited to 6. Source: https://upstash.com/docs/redis/sdks/ts/pipelining/auto-pipeline
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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_BxppKRT0P-XCviP_Aa1KKQ" 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">upstash/redis auto-pipelining is on by default: batch with Promise.all, dont await each call <span>— Vectle</span></a>