Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory spike issue with Next.js 15.1.4 on Azure #74855

Open
1 task done
skerdi03 opened this issue Jan 14, 2025 · 2 comments
Open
1 task done

Memory spike issue with Next.js 15.1.4 on Azure #74855

skerdi03 opened this issue Jan 14, 2025 · 2 comments
Labels
examples Issue was opened via the examples template.

Comments

@skerdi03
Copy link

skerdi03 commented Jan 14, 2025

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.2.0: Fri Dec  6 18:51:28 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8112
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 20.13.1
  npm: 10.8.1
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.1.4 // Latest available version is detected (15.1.4).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: standalone

Which example does this report relate to?

This issue is not related to any specific example in the examples folder. The problem occurs in a general Next.js application deployed on Azure.

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

We are experiencing a significant memory spike and auto-scaling issues when using Next.js 15.1 in our Azure deployments. Memory usage increases unpredictably under typical traffic conditions, leading to higher resource utilization and triggering unnecessary auto-scaling.

When downgrading to Next.js 14.2, these issues are resolved, and memory usage returns to stable levels. This suggests a regression introduced in version 15.1.

Graphs comparing memory usage for versions 15.1 and 14.2 are attached below for reference.

Image

Image

Expected Behavior

Memory usage should remain stable and consistent under typical traffic conditions when using Next.js 15.1, similar to the behavior observed in Next.js 14.2.

To Reproduce

Deploy a Next.js 15.1 application on Azure with typical production traffic patterns.
Monitor the memory usage and auto-scaling behavior using Azure's monitoring tools.
Observe that memory usage increases significantly and unpredictably, causing auto-scaling to trigger even under normal load.
Downgrade the application to Next.js 14.2.
Re-monitor the application, noticing that memory usage stabilizes and auto-scaling behaves as expected.

Image

Image

@skerdi03 skerdi03 added the examples Issue was opened via the examples template. label Jan 14, 2025
@frankbo
Copy link

frankbo commented Jan 14, 2025

We are facing a similar issue in our kubernetes pods. With Nextjs 15.1.3 the memory consumption was/is fine and the pods run as expected, but with the update to 15.1.4 the pods want to consume more and more memory and die at some point. Normally our pods use 110mb memory and are fine with that. With the update to Nextjs 15.1.4 they start with 115 and the memory get up to 300mb, then they die and it starts over again. From the graphs it looks like a memory leak or at least something that consumes more memory then necessary over time.
Let me know if you need further information.

@skerdi03 did you try version 15.1.3 as well. And do you face the same issues there?

@vitalyiegorov
Copy link

vitalyiegorov commented Jan 15, 2025

We are facing the same issue with the node:18-alpine image on NextJS 15.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issue was opened via the examples template.
Projects
None yet
Development

No branches or pull requests

3 participants