What happened on our test
next build and next start, and a 2 MB file in a form handled by a Server Action.On 16.10.2026 we built a form with an email field and a file input, handled by a Server Action through useActionState, on Next.js 16.4.2 in production mode. With a 2 MB file the server log printed:
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 with statusCode: 413.
The browser saw something else. The network tab showed the POST as 500, and the console showed Uncaught Error: Minified React error #441, which React's decoder explains as an error in the Server Components render whose message is hidden in production. The action never ran, its state stayed empty, and the page did not change. A visitor would think the button does nothing and probably try again.
Minified React error #441: the real message is in the server log
React's error decoder gives #441 as: “An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.” The number only tells you that the server failed while rendering a Server Component or running a Server Action. Production builds keep the reason away from the browser.
To find the reason, read the server's output, not the browser console. In our test that was the next start terminal, which printed Error: Body exceeded 1 MB limit for the same request that the browser logged as #441. On a host, it is the function or runtime log. The Next.js docs say the error's digest is a hash you can match against the server-side logs, which helps when many requests fail at once. In development the original message is passed to the browser, so next dev is often the quickest way to read it.
Raise the limit
The setting lives in next.config. With bodySizeLimit: "5mb" and a rebuild, the same 2 MB upload reached the action and returned its size. Pick a limit just above the largest file you accept; the setting applies to every Server Action in the app.
// next.config.mjs
export default {
experimental: {
serverActions: { bodySizeLimit: "5mb" },
},
};Tell the visitor before the request
Because the failure was silent on our test, check the size in the browser too. Read input.files[0].size on change, and show “Files up to 4 MB” before the form is sent. The server limit stays as the real guard, since a browser check is easy to skip.
A route handler did not hit this limit: on next start our /api/contact route read the same 2 MB file without complaint. On Vercel, though, the platform's docs set a request body limit for functions of 4.5 MB, and a larger request gets 413 FUNCTION_PAYLOAD_TOO_LARGE before your code runs. For large files, upload straight to storage and send only the link with the form. More Next.js form errors are in our Next.js contact form guide.
Sending attachments without a Server Action
A form that posts straight to Formgong at https://formgong.com/submit never passes through your Server Action, so this Next.js limit does not apply to it. Formgong has its own attachment rules, described in the file upload guide.
Frequently asked questions
What does Body exceeded 1 MB limit mean in Next.js?
The request to a Server Action was larger than its default 1 MB limit, usually because the form included a file. Next.js refused it with status 413 before the action ran.
How do I increase the Server Action body size limit?
Set experimental.serverActions.bodySizeLimit in next.config, for example "5mb", and rebuild. It worked on our Next.js 16.4.2 test.
What is Minified React error #441?
React's production code for an error in the Server Components render, which includes Server Actions. The real message is hidden from the browser and printed in the server log. In our test it was Body exceeded 1 MB limit.
Why does my form do nothing when the file is too big?
On our test the browser got a 500 and a minified React error, the action never ran, and the page showed no message. Check the file size in the browser and show an error yourself.
Sources and documentation
Official references for this guide: Next.js: serverActions (bodySizeLimit), React: error decoder #441, Next.js: error.js (error.digest), Vercel: Functions limits (request body size). HTML contact form, where data is stored.
Related guides
- Lovable form submissions to email and Telegram
- HTML contact form without a backend: a working example
- How to send website form submissions to Telegram
- Contact form not sending email? Check where it stops
- Managing website leads in Telegram without a CRM
- Form backend for Lovable, Bolt, v0, Cursor
- Telegram bot for a contact form: build or skip?
- GDPR form backend: 7 checks before you choose
- Lovable form not sending email? 6 fixes
- Netlify Forms not working? React and Bolt fixes
- Stop contact form spam without a CAPTCHA
- GitHub Pages contact form: a working setup
- Mailto Form in HTML: Why It Fails and What to Use
- HTML form to Google Sheets: 2 free methods
- Webflow form submission limit: what to do at 50
- Turnstile vs reCAPTCHA vs hCaptcha for forms
- Contact Form 7 and Elementor forms to Telegram
- Squarespace contact form not sending email?
- Shopify contact form: where do messages go?
- Google Form to Telegram: free Apps Script way
- Wix contact form not sending email? Fixes
- EU / GDPR Formspree alternatives compared
- HTML form action attribute explained
- How do HTML forms work? The HTTP request
- Types of Injection Attacks on Web Forms (2026)
- Indirect Prompt Injection in MCP
- MCP Rug Pull Attack: Detect Tool Changes
- Form without a backend: 7 ways that work
- Thank-you page after form submission (HTML)
- Indirect Prompt Injection Examples (2023–2026)
- Indirect Prompt Injection via Email
- What Is Tool Poisoning in MCP?
- WordPress contact form without a plugin
- Send email from frontend JavaScript
- How to Prevent Indirect Prompt Injection
- Honeypot Form Field: How to Add One That Works
- Contact Form with File Upload (HTML, No PHP)
- Angular contact form without a backend
- Send form submissions to Slack or Discord without Zapier
- Verify a form webhook signature (HMAC-SHA256)
- Contact forms that send nothing: 793 AI-built sites tested
- v0 contact form that actually sends: 3 ways
- How we tested AI-built contact forms, and 12 bugs we hit
- Cloudflare vs Netlify free plan: hosting that never pauses
- EmailJS 412 “Gmail_API: Invalid grant”: reconnect Gmail
- Resend “You can only send testing emails”: verify a domain
- Supabase Edge Function blocked by CORS policy: 3 causes
- Formspree “Form not found” and other errors: fixes
- Web3Forms errors: “Invalid access key” and 403 explained
- How to add customer reviews to your website for free
- Getform not working? “This form has been deleted” and more
- Next.js contact form not working? 6 errors, reproduced
- Webflow form not sending email? What to check, tested
- FormSubmit not working? “This form needs Activation” fix
- Contact form “TypeError: Failed to fetch”: causes and fixes
- WooCommerce product enquiry form
- Contact Form 7 vs WPForms
- Gravity Forms alternative free
- WordPress contact form block
- 535-5.7.8 Username and Password not accepted (Gmail)
- 535 5.7.3 Authentication unsuccessful: Office 365 SMTP
- Nodemailer “Missing credentials for "PLAIN"”: the fix
- Nodemailer “Greeting never received”: port 465 fix
- Nodemailer SSL “wrong version number”: the port fix
- Nodemailer “self-signed certificate in certificate chain”
- Nodemailer ECONNREFUSED 127.0.0.1:587: missing SMTP host
- SendGrid “authorization grant is invalid”: 401 fix
- Mailgun 401 Forbidden: why the API rejects your key
- “Edge Function returned a non-2xx status code”: the fix
- Unexpected token '<', "<!DOCTYPE "... is not valid JSON
- “TypeError: Body is unusable”: body has already been read
- Turnstile “timeout-or-duplicate” and other siteverify errors
- Turnstile vs hCaptcha vs reCAPTCHA: speed and size tested
- Judge.me reviews not showing on Shopify: how to fix it
- Judge.me review carousel not showing: how to fix it
- Yotpo reviews not showing on Shopify? Check the app embed
- Loox reviews not showing on product page: how to fix
- Shopify reviews not showing: what to check first
- How to show reviews on Shopify
- GDPR for website forms: what each type of form needs
- WooCommerce reviews not showing: how to fix it
- Stamped.io reviews not showing on Shopify: how to fix it
- Etsy reviews not showing: why and what to do
- Trustpilot widget not loading: how to fix TrustBox
- Yotpo problems in 2026: what merchants report
- Contact Form 7 “error trying to send your message” fix
- Elementor form “Your submission failed because of an error”
- Framer form not sending email or not working: what to check
- Carrd contact form not working: plans, spam and errors
- Google review link not working: what customers see and why
- tawk.to widget not showing on your website: causes and fixes
- How to add questions and answers to your product page
- “Failed to send a request to the Edge Function”: fixes
- Next.js “Failed to find Server Action”: what it means
- Brevo “unauthorized: Key not found” 401: the fix
- Amazon SES “Email address is not verified”: the fix
- Shopify contact form not working: how to fix it
- Judge.me alternative for WooCommerce after the 2025 shutdown
- Free WooCommerce review plugins compared on the free version
- WooCommerce review reminder emails without a paid plugin
- Add Voice Recording to a Website Form
- Contact Form 7 spam: how to stop it
- WPForms not sending email: how to fix it
- Contact form emails going to spam: how to fix it
- HTML form not submitting: how to fix it
- Contact form not working: how to find the fault
- Webflow form spam: how to stop it
- Website form to Notion: how to set it up
- Website form to WhatsApp: what works and what does not