# Next.js “Body exceeded 1 MB limit”: Server Action fix

A form with a file over 1 MB fails in a Next.js Server Action, and the visitor may see nothing at all. Reproduced on Next.js 16.4, with the fix.

Author: Formgong team
Published: 2026-10-16
Updated: 2026-10-23
Language: en
Canonical: https://formgong.com/en/blog/nextjs-body-exceeded-1mb-limit/

Server Actions accept 1 MB of request body by default, and a form with a photo or PDF is over it fast. Raise the limit with experimental.serverActions.bodySizeLimit in next.config, for example "5mb". On our test the visitor saw nothing when the limit was hit, so also check the file size in the browser and show a message before sending.

## What happened on our test

*Figure: A Next.js contact form with a 2 MB attachment: after Send nothing changes on the page. The terminal shows Error: Body exceeded 1 MB limit with status 413, and the browser console shows Minified React error 441.*

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.

```javascript
// 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](/en/blog/nextjs-contact-form-not-working/).

## Sending attachments without a Server Action

A form that posts straight to [Formgong](/en/) 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](/en/blog/contact-form-with-file-upload/).

## 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

- [Next.js: serverActions (bodySizeLimit)](https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions)
- [React: error decoder #441](https://react.dev/errors/441)
- [Next.js: error.js (error.digest)](https://nextjs.org/docs/app/api-reference/file-conventions/error)
- [Vercel: Functions limits (request body size)](https://vercel.com/docs/functions/limitations)
- [HTML contact form](https://formgong.com/en/docs/html/)

[Get a form key](https://formgong.com/en/#top)
