-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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 with Image Optimization in Next.js Docker Environment #66103
Comments
This comment has been minimized.
This comment has been minimized.
nextjs is a really great framework but it's really tricky to use if it's not vercel.. |
@vitalyiegorov Are you also on Docker on Alpine Linux? We are seeing memory leaks on version 14.2.18 on alpine linux, in Docker, on Auzre, so it seems this is a perfect explanation for our problems. Edit: Celebrated too early.. |
Thank you for your feedback. I was able to resolve the issue by updating the operating system and the version of Next. |
You should probably close this issue then. May I ask what operating system you updated to that fixed the issue for you? |
@karlmacklin Ubuntu 20.04 |
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/adgsenpai/imageleakdemo
To Reproduce
Access the application and observe the memory usage.
Enable image optimization by adding or ensuring the following in
next.config.js
:Current vs. Expected behavior
Expected Behavior:
The Next.js application should run without any significant memory leaks, maintaining stable memory usage during operation.
Actual Behavior:
The application shows progressively increasing memory usage over time, leading to high memory consumption and potential crashes.
Provide environment information
Which area(s) are affected? (Select all that apply)
Image (next/image)
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
Deployment Platform: Docker
Reproducibility: The issue is consistently reproducible in the Docker environment. It does not occur when running the application locally outside of Docker.
Browsers: The memory leak is observed regardless of the browser used to access the application, indicating it is not browser-specific.
Environment: The issue has been specifically noted when running on Alpine Linux with the following setup:
Platform: linux
Arch: x64
Version: Alpine Linux
The text was updated successfully, but these errors were encountered: