Source code Performance Cost Stability

Unbounded fan-out / no concurrency cap

Part of the Cost controls check · fix arrives as a guide

What it is

A set of async operations is dispatched all at once — commonly Promise.all over an array whose length is data-dependent — with no cap on how many run concurrently.

Why it matters

It works on ten items and takes down a dependency on ten thousand. The fan-out exhausts connection pools, trips downstream rate limits, and can exceed the function's memory before any of it completes.

How to fix it

Run the batch through a concurrency limiter with a fixed ceiling, or chunk it and await each chunk. Pick the limit from what the slowest downstream dependency can absorb, not from what the runtime allows.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.