Deployment Failure: "Error: Body exceeded 3300kb limit"

I am using Nuxt v3 to prerender about 2000 pages on Vercel and deploy them statically, with a fallback to SSR. I’ve done this with several other sites and it’s always worked smoothly, although this is the largest amount of pages by about 2x.

The build and prerender process completes without any errors or warnings throughout the entire build process. But right at the very end, I get:

Build Completed in /vercel/output [4m]
Deploying outputs...
Error: Body exceeded 3300kb limit

image

The is the last log on the deployment. I’ve searched on Google but it returns zero results. I can build and prerender the project locally and it works fine.

Any help would be very much appreciated.

Hello,

It does sound like you are pre-rendering too many pages for the project build to complete on Vercel in this case.

In these cases, we recommend using ISR instead so that some pages are server side rendered instead. You can read more about this option here for Next.js: Incremental Static Regeneration (ISR)

2 Likes

Hi @swarnava, thank you for the response!

Do you have any information on which file is exceeding the 3300kb? All the pages prerender correctly, it seems to just be the final output that fails. Maybe there is a chance I can workaround it if I have more info?

Do you know also the max prerendered pages on average that can be deployed? There is nothing in the docs and 3300kb is a relatively low file size for whatever is causing the failure!

Can you please also answer if there is a limit to how many ISR pages we can have cached all at once? If I ISR 2000 pages, can I create my own crawler to hit all pages so they get cached, or would that roll over some limit and we would end up losing some of the cached pages?

Cheers.

Hi @swarnava,

Testing ISR today. If I follow the X-Vercel-Id header I can see that the request hits my closest Edge location (in Europe) but then always hits the main Vercel Function server (in US).

In comparison, the sites I’ve built that are prerendered and static only go to the closest Edge location.

Is this expected behaviour? The X-Vercel-Cache header shows a MISS fairly often too. Static never misses and really is the preferred approach for me if we can dive a bit further in on your side to see what’s going on that would be very much appreciated!

Thanks in advance.

Hi @swarnava

Any update would be much appreciated.

Cheers.

Based on your observations, you’re seeing expected behavior for ISR pages compared to fully static pages.

When a request comes in for an ISR page:

  1. The request first hits your closest Edge location
  2. If the page isn’t cached or needs revalidation, it gets routed to a Vercel Function server (which may be in a different region like the US)
  3. The X-Vercel-Id header shows this path through multiple regions

In contrast, fully static pages are distributed to all Edge locations during deployment and served directly from the Edge without needing to hit a Function server.

The x-vercel-cache header showing MISS for ISR pages is also expected behavior in several scenarios:

  • First-time requests for the page
  • After the cache has expired (based on your revalidate time)
  • When the page is being regenerated

For ISR pages, a MISS indicates that the response was not found in the edge cache and was fetched from the origin server. This is part of how ISR works - it generates pages on demand when they’re not cached.

ISR pages are implemented as Prerender Functions on Vercel, which are Serverless Functions that get cached by the Edge Network. They follow specific caching rules and have an expiration time that determines when they’ll be regenerated.

If you’re seeing too many MISSes, you might want to:

  • Increase your revalidate time
  • Consider using a fallback static file for your ISR pages
  • For truly static content, continue using fully static pages as you noted they perform better for your use case
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.