# 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

**Code:** `Body exceeded 1 MB limit (Server Actions)` · **Category:** Next.js · **Seen on:** Next.js, Node.js

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

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

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/nextjs/server-action-body-size-limit)
