Body exceeded 1 MB limit (Server Actions) Next.js Origin: On your device OSI layer 7 · Application Last updated 5 Nov 2026

Next.js: Error: Body exceeded 1 MB limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit

A Server Action (often a file upload) sent more than the default 1 MB request body.

Exact message you may see Body exceeded 1 MB limit. To configure the body size limit for Server ActionsError: Body exceeded 1 MB limitBody exceeded 1mb limit server actions bodySizeLimitAPI resolved without sending a response; Body exceeded 1mb limit
Seen on: Next.js Node.js

Meaning

Raise serverActions.bodySizeLimit in next.config.js (e.g. '10mb'), or upload large files directly to storage with presigned URLs instead of through the action. Reverse proxies (Nginx client_max_body_size) and hosting limits (Vercel 4.5 MB) can also reject large bodies.

Common causes

  • File upload through a Server Action
  • Large form payload
  • Default 1 MB limit
  • Proxy/platform body limit lower than configured
  • Base64 images in form fields

⚡ Quick fix

  1. experimental: { serverActions: { bodySizeLimit: "10mb" } } (or top-level serverActions per version)
  2. Use presigned URL uploads to S3/GCS
  3. Raise client_max_body_size on Nginx

Detailed fix by platform

Next.js

  1. module.exports = { experimental: { serverActions: { bodySizeLimit: "10mb" } } };

How to diagnose

  1. Size — Payload vs limit?
  2. Proxy — Body limit?
  3. Alternative — Direct upload?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

413 — HTTP 413 Content Too Large (Request Entity Too Large) (HTTP)413Conflicting app and page file was found — Next.js: ⨯ Conflicting app and page file was found, please remove the conflicting files to continue: "pages/index.tsx" - "app/page.tsx" (Next.js)Conflicting app and p…Failed to find Server Action — Next.js: Error: Failed to find Server Action "abc123". This request might be from an older or newer deployment (Next.js)Failed to find Server…next build: fetch failed ECONNREFUSED (build-time API) — Next.js: Error occurred prerendering page "/blog" TypeError: fetch failed { cause: Error: connect ECONNREFUSED 127.0.0.1:3000 } (Next.js)next build: fetch fai…next build: JavaScript heap out of memory — Next.js: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (during next build) (Next.js)next build: JavaScrip…nginx: client intended to send too large body — Nginx: [error] client intended to send too large body: 5242880 bytes (413 Request Entity Too Large) (Nginx / Apache)nginx: client intende…Server actions must be async functions — Next.js: Error: Server actions must be async functions (Next.js)Server actions must b…Vercel FUNCTION_PAYLOAD_TOO_LARGE (413) — Vercel: 413 FUNCTION_PAYLOAD_TOO_LARGE — Request Entity Too Large (4.5 MB limit) (Next.js)Vercel FUNCTION_PAYLO…Body exce…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.