facebook/react · error · Error
580
580
Error message
Server Function has too many bound arguments. Received %s but the limit is %s.
What it means
Server References ('use server' functions) support partial application via .bind, and the wire protocol caps the stored bound arguments at MAX_BOUND_ARGS = 1000 (defined in ReactFlightReplyServer). bindArgs in ReactFlightActionServer throws error code 580 when the server reconstructs a bound server reference with more than 1000 stored arguments; the client-side serializer enforces the same cap.
Source
Thrown at packages/react-server/src/ReactFlightActionServer.js:34
import {
resolveServerReference,
preloadModule,
requireModule,
} from 'react-client/src/ReactFlightClientConfig';
import {
createResponse,
close,
getRoot,
MAX_BOUND_ARGS,
} from './ReactFlightReplyServer';
type ServerReferenceId = any;
function bindArgs(fn: any, args: any) {
if (args.length > MAX_BOUND_ARGS) {
throw new Error(
'Server Function has too many bound arguments. Received ' +
args.length +
' but the limit is ' +
MAX_BOUND_ARGS +
'.',
);
}
return fn.bind.apply(fn, [null].concat(args));
}
function loadServerReference<T>(
bundlerConfig: ServerManifest,
metaData: {
id: ServerReferenceId,
bound: null | Promise<Array<any>>,
},
): Promise<T> {View on GitHub (pinned to eafeac097b)
Solutions
- Pass one object or array argument containing the data instead of binding many positional arguments
- Split the work across multiple server action calls if the payload is genuinely huge
- Remember each .bind call appends to the stored bound args toward the 1000 limit
Example fix
// before
const save = saveRows.bind(null, ...rows); // rows.length > 1000 -> throws
<form action={save}>...</form>
// after
const save = saveRows.bind(null, {rows}); // single payload argument
<form action={save}>...</form> Defensive patterns
Strategy: validation
Validate before calling
const MAX_BOUND_ARGS = 1000; // React's limit (ReactFlightReplyServer)
function bindServerAction(fn, ...args) {
if (args.length > MAX_BOUND_ARGS) {
throw new RangeError(`Too many bound args: ${args.length} > ${MAX_BOUND_ARGS}`);
}
return fn.bind(null, ...args);
} Prevention
- Pass bulk data as one object argument, not many bound positional args
- Remember chained binds accumulate toward the 1000-argument cap
- Prefer form fields/FormData for large payloads to server actions
When it happens
Trigger: Client code calling serverAction.bind(null, ...hugeArray), or accumulating arguments across repeated .bind calls (over 1000 total), then invoking the bound action (form action or transition) so the server rejects the decoded reference.
Common situations: Passing large row datasets to a server action via bind instead of a single payload object; programmatic bind loops; spreading request data into .bind.
Related errors
- Invalid reference.
- Missing a temporary reference set but the RSC response retur
- Trying to call a function from "use server" but the callServ
- Values cannot be passed to next() of AsyncIterables passed t
- Failed to read a RSC payload created by a development versio
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/c598671c75708cf1.
Report an issue: GitHub.