next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Server requests and latency increased after upgrading from Next.js 15 to 16

Open carlos-dubon opened this issue 2 months ago • 12 comments

Link to the code that reproduces this issue

https://github.com/carlos-dubon/next-16

To Reproduce

Upgrade to Next.js version 16

Current vs. Expected behavior

After upgrading from Next.js 15 to Next.js 16, I noticed that the number of requests effectively doubled. This has resulted in increased server strain and higher response latency. It also seems to require more resources and therefore higher server costs $$$ (good for cloud services I guess?) compared to v15.

Server request patterns and performance should remain consistent (or improve) after upgrading.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.0.0: Wed Sep 17 21:41:45 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T6000
  Available memory (MB): 65536
  Available CPU cores: 10
Binaries:
  Node: 24.10.0
  npm: 11.6.1
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.5.5 // An outdated version detected (latest is 16.0.0), upgrade is highly recommended!
  eslint-config-next: N/A
  react: 19.1.1
  react-dom: 19.1.1
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Performance

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

The screenshot shows the ops/s after deploying v16 around 3:30 PM, I then proceeded to revert back my changes:

Image

I am self-hosting Next.js, and upgrading will most likely increase our cloud bill $$$.

carlos-dubon avatar Oct 28 '25 17:10 carlos-dubon

Im confused about this post. are you aware that nextjs 16 is cache opt in now? did you read the docks on use cache and dynamicIO settings?

parkerhutchinson avatar Oct 28 '25 18:10 parkerhutchinson

I was also experiencing this issue. See screenshot:

Image

On Oct 23 I upgraded to next 16. Yesterday I rolled back to 15 an the number of requests went down to half.

I notice that prefetch requests are duplicated. Will try to replicate an open a new issue.

jperezr21 avatar Oct 29 '25 01:10 jperezr21

Straight from the NextJS 16 blog post: https://nextjs.org/blog/next-16#enhanced-routing-and-navigation

Trade-off: You may see more individual prefetch requests, but with much lower total transfer sizes. We believe this is the right trade-off for nearly all applications. If the increased request count causes issues, please let us know. We're working on additional optimizations to inline data chunks more efficiently.

Looks like this is to be expected?

HappyEmu avatar Oct 29 '25 19:10 HappyEmu

If the increased request count causes issues, please let us know.

That's what we're doing.

Upgrading to Next 16 increased my costs considerably, without noticeable/worthy performance improvements.

jperezr21 avatar Oct 29 '25 21:10 jperezr21

Hi, another aspect of this issue is the number of files generated during the build that then have to be uploaded (for example, to S3). Our full deploy cycle went from about 2 minutes to around 10 minutes because of the large number of small files we now need to transfer. We deploy hundreds of sites a dozen times per day, so this has a significant impact on our costs and on our ability to ship changes quickly.

We are using the full static export (output: 'export').

We will be staying on Next 15 for the time being.

bartdag avatar Nov 12 '25 14:11 bartdag

We have 2 products currently deployed to production on Vercel which have just been upgraded to Next 16. The number of requests of one of our products are shown in the image below. The requests have increased ~700%+. Each request gets counted towards Edge Requests ($2.00 per million) and I'm quite sure the supposed lower bandwidth use is not going to offset this increase.

At this rate for one of our products this increase will result in cost increase of $800+ just for the Edge Requests. And I'm not sure if this could also hit other metrics counted towards the bill e.g. Edge Config Requests (our proxy/middleware does a Edge Config request).

Image

willemliufdmg avatar Nov 19 '25 10:11 willemliufdmg

I upgraded to Next.js 16, and the cost of my app went to the roof, like REALLY bad. Unfortunately, I only noticed it after a week or so, and I ended up with a really nasty bill.

The upgrade was a dependabot upgrade, even though there was a major release, my CI was green (linter, compiler, and e2e tests), so I merged the PR. Still my responsibility, though.

I had to downgrade, and Vercel was kind enough to give me a 25% refund, even though it wasn't Vercel's fault.

Image

dani-mp avatar Nov 19 '25 11:11 dani-mp

Can this be fixed by re-enabling caching or it's an actual Next.js 16 bug?

elie222 avatar Nov 23 '25 22:11 elie222

Hi! Same problem here! After upgrade to Next16, our server's CPU is at 90-95% all the time, whereas before it was at 50-60%.

cararlai avatar Nov 25 '25 06:11 cararlai

Same. 2-3x requests, 2-3x in actual $$$ usage, no changes in performance.

Image Image

mxseev avatar Nov 25 '25 10:11 mxseev

@HappyEmu

Straight from the NextJS 16 blog post: https://nextjs.org/blog/next-16#enhanced-routing-and-navigation

Trade-off: You may see more individual prefetch requests, but with much lower total transfer sizes. We believe this is the right trade-off for nearly all applications. If the increased request count causes issues, please let us know. We're working on additional optimizations to inline data chunks more efficiently.

Looks like this is to be expected?

One drawback of the new prefetch behavior is that it competes with the LCP element, negatively affecting that Core Web Vitals metric compared to pre-v16.

After we disabled prefetch globally in v15.5.5, our PageSpeed Insights score increased substantially (from roughly 85 to 98).

carlos-dubon avatar Dec 02 '25 05:12 carlos-dubon

Our team upgraded to v16 due to CVE-2025-66478. We globally disabled prefetch and this has fixed our latency issues:

Image

carlos-dubon avatar Dec 08 '25 01:12 carlos-dubon