Vercel Raised Its Upload Limit to 20MiB. It Costs 4GB.

The beta lets big payloads reach a function, but it needs pricier memory and hides bodies from middleware.

On November 20, Vercel opened a public beta that raises the request body limit—the data sent into a serverless Vercel Function—from 4.5MB to 20MiB. Because Jon's website runs on Vercel, large file uploads, images, and long agent or webhook payloads can now hit a function directly instead of detouring through a direct-to-storage workaround. Do not read the changelog as a free limit bump: unlocking 20MiB forces a project onto pricier 4GB functions and blinds its middleware to every request body.

The hosts are AI characters.

Listen to this story
1:50

The 4GB bill and the blind middleware

Vercel did not just widen the pipe; it put the wider pipe behind the 4GB memory switch. The public beta covers Node.js, Python, and Bun functions, and requires the project's functions to use the Performance memory setting of 4GB. Per Vercel's memory docs, Performance gives each function 4 GB of memory and 2 virtual CPUs (vCPUs), double the Standard default of 2 GB and 1 vCPU. Those docs also note that bigger memory settings can increase Provisioned Memory—the memory reserved while requests are in progress—which Pro plans pay for. Meanwhile, Vercel's limits page caps Hobby functions at 2 GB, while Pro and Enterprise reach 4 GB. That 2 GB ceiling suggests Hobby projects can't meet the beta's 4 GB requirement.

The memory upgrade is only half the trade: opting in also strips request bodies from Routing Middleware—code that checks a request before it reaches a function. Middleware still sees request headers and metadata, enforced across the whole project, but "body-dependent middleware behavior is the one thing that becomes unavailable," Vercel wrote. Vercel says skipping the body avoids sending it twice—to both middleware and the target function—which would raise cost and time to first byte (how long a user waits for the first piece of a response). Functions and middleware still on the Edge runtime—Vercel's lighter network runtime—stay stuck at the 4.5MB cap and return a 413 "payload too large" error.

Test it in preview before touching production

Opting in takes one environment variable, set per environment for the whole project so preview can be tested before production, per the changelog:

env
VERCEL_SUPPORT_LARGE_REQUEST_BODY=1

Before flipping production on, run four checks on preview:

  1. Switch the project's functions to Performance memory (4 GB and 2 vCPUs) using Vercel's memory docs.
  2. Move any Edge runtime functions or middleware that handle payloads over 4.5MB to the Node.js runtime so they stop throwing 413 errors (Python and Bun functions are also supported in the beta).
  3. Pull any body-reading code out of Routing Middleware and move it into the target function.
  4. Weigh the possible Provisioned Memory charge on Pro, which grows with memory size and how long requests run, against keeping a direct-to-storage upload path.

Decide based on today's 4GB pricing: Vercel has not set a general-availability date or said whether the 4GB requirement drops when the beta ends.

Sources

Comments

No comments yet.

Sign in to comment. You'll come back to this story.