-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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 Leak in Edge Runtime #63796
Comments
@floatingdino [before] - docker node.js version 18 |
We had the same issue as @chane81 described. Are you using node.js 20.16.0 or 20.17.0? If so, please try 20.18.0, or 20.15.1 |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/floatingdino/nextjs-edge-memory-bug
To Reproduce
npm run test
app/page.js
and run test command againCurrent vs. Expected behavior
When requesting pages in edge runtime, I expect the memory footprint to remain consistent or self-correct spikes as shown when using the Node runtime
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 Binaries: Node: 20.10.0 npm: 10.2.3 Yarn: N/A pnpm: 8.10.2 Relevant Packages: next: 14.1.4 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: N/A Next.js Config: output: standalone
Which area(s) are affected? (Select all that apply)
App Router, Middleware / Edge (API routes, runtime)
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
Edge runtime memory usage:
Node runtime memory usage:
When deploying on Vercel, this seems to be fine (I assume each request is serverless and the memory footprint is completely cleansed once the connection is closed) however, when deploying with Docker, this inevitably causes OOM issues. This doesn't seem to be a Docker-specific issue as running with node locally also exhibits memory inflation.
The text was updated successfully, but these errors were encountered: