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.
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 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
experimental: { serverActions: { bodySizeLimit: "10mb" } }(or top-levelserverActionsper version)- Use presigned URL uploads to S3/GCS
- Raise
client_max_body_sizeon Nginx
Detailed fix by platform
Next.js
module.exports = { experimental: { serverActions: { bodySizeLimit: "10mb" } } };
How to diagnose
- Size — Payload vs limit?
- Proxy — Body limit?
- 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:
Similar errors
- 413 HTTP 413 Content Too Large (Request Entity Too Large)
- Conflicting 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"
- Failed to find Server Action Next.js: Error: Failed to find Server Action "abc123". This request might be from an older or newer deployment
Most viewed in Next.js
- NEXT_REDIRECT Next.js: Error: NEXT_REDIRECT (redirect() inside try/catch)
- server-only Next.js: You're importing a component that needs "server-only". That only works in a Server Component
- cookies() should be awaited Next.js 15: Route "/x" used `cookies().get('token')`. `cookies()` should be awaited before using its value
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 5 Nov 2026