Vercel FUNCTION_PAYLOAD_TOO_LARGE (413) Next.js Origin: On your device OSI layer 7 · Application Last updated 5 Nov 2026

Vercel: 413 FUNCTION_PAYLOAD_TOO_LARGE — Request Entity Too Large (4.5 MB limit)

A request or response exceeded Vercel's 4.5 MB serverless function payload limit.

Exact message you may see 413: FUNCTION_PAYLOAD_TOO_LARGE VercelRequest Entity Too Large Vercel 4.5MBCode: FUNCTION_PAYLOAD_TOO_LARGEVercel response payload size exceeded 4.5 MB
Seen on: Next.js

Meaning

Large uploads/downloads can't go through a Serverless Function. Upload directly from the browser to storage (Vercel Blob, S3 presigned URL, Supabase), stream responses, or split data/pagination. Raising Next.js body limits doesn't bypass the platform limit.

Common causes

  • File upload through an API route
  • Large JSON response over 4.5 MB
  • Base64-encoded images in request body
  • Server Action with big payload
  • Proxying large downloads

⚡ Quick fix

  1. Use direct-to-storage uploads (presigned URLs/Vercel Blob client uploads)
  2. Paginate or stream large responses
  3. Compress or reduce payload size

Detailed fix by platform

Next.js

  1. import { handleUpload } from "@vercel/blob/client"; // client-side direct upload

How to diagnose

  1. Size — Request/response?
  2. Route — Upload or API?
  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)413Body exceeded 1 MB limit (Server Actions) — 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 (Next.js)Body exceeded 1 MB li…Edge Function size limit exceeded — Vercel: The Edge Function "middleware" size is 1.2 MB and your plan size limit is 1 MB. Learn More: https://vercel.link/edge-function-size (Next.js)Edge Function size li…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…Prisma Client out of date on Vercel (prisma generate) — Vercel: PrismaClientInitializationError: Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client (Next.js)Prisma Client out of …Vercel FUNCTION_INVOCATION_TIMEOUT (504) — Vercel: 504 GATEWAY_TIMEOUT — FUNCTION_INVOCATION_TIMEOUT: An error occurred with your deployment (Next.js)Vercel FUNCTION_INVOC…Vercel: Command "npm run build" exited with 1 — Vercel: Error: Command "npm run build" exited with 1 (Next.js)Vercel: Command "npm …Vercel FU…

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.