You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I initialized new Next project and added a dynamic route with async server component, which is fetching data from the API with no-cache. The code is very simple, and I'm using fresh local Express API to just send example data:
After starting the Docker container the memory usage is just around 45MB, but after doing 10k requests with K6, the memory stays at ~400MB and never goes down. In real world app, this leads to out of memory errors. Everything's working correctly with axios and cross-fetch, so for me it looks like garbage collector is not able to cleanup fetch cache. Also, I tried multiple different Next canary, and NodeJS versions - they did not fix the issue.
I saw multiple reported issues about memory leaks, but mine is much simpler, so I don't want to create another issue yet. Does anybody have similar issues?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I initialized new Next project and added a dynamic route with async server component, which is fetching data from the API with
no-cache. The code is very simple, and I'm using fresh local Express API to just send example data:After starting the Docker container the memory usage is just around 45MB, but after doing 10k requests with K6, the memory stays at ~400MB and never goes down. In real world app, this leads to out of memory errors. Everything's working correctly with axios and cross-fetch, so for me it looks like garbage collector is not able to cleanup fetch cache. Also, I tried multiple different Next canary, and NodeJS versions - they did not fix the issue.
I also prepared example reproduction here:
https://github.com/kamdubiel/next-fetch
I saw multiple reported issues about memory leaks, but mine is much simpler, so I don't want to create another issue yet. Does anybody have similar issues?
Beta Was this translation helpful? Give feedback.
All reactions