Closed dissy123 closed 1 week ago
Would you be able to provide a reproduction? 🙏
Is this new behaviour? Did you garbage collect before and after taking snapshots? And yes, I do need a reproduction. 🙏
https://github.com/dissy123/nuxt-memory-leak reproduction! :-)
I really don't know if it is new behaviour, because last weekend we fixed that memory leak in nuxt-booster https://github.com/basics/nuxt-booster/issues/1089, and afterwards i found another memory leak in my monorepository. I uninstalled all modules and everything i coded on my self and it was also there.
After that i then just checked out the bare actual version without everything and I also got a memory leak.
And Yes i did garbage Collection before Taking the snapshots :)
I refreshed your lockfile + updated to Node v22 and could not reproduce.
Between each snapshot I ran:
ab -n 1000 -c 50 "http://localhost:3000/"
I launched the server with:
pnpm nuxi build && NODE_ENV=production node --enable-source-maps --inspect .output/server/index.mjs
Would you be able to provide a reproduction? 🙏
Need to add to this thread, although it's maybe not related. There seems to be a memory leak that has to do something with useHead. I am not sure when it started bcs we just started perf testing before the release. Seems the issue is reproducible when you crawl the site. Firing just one route will in most cases do nothing. I am unfortunately using all of the modules: nuxt-seo, i18n, vueuse etc etc. so i can't really isolate it. But I'll post here if i find the culprit.
interesting just tried it again. Deleted the lockfile and executed the commands you provided.
Will check my system again, will have more time next week.
Hmm same stuff here. Is it the latest useHead update? My nuxt version is 3.12.4 and use head is 1.10.0
@dissy123 are you using useHead server side in nuxt plugins. I mean not in the setup script ?
@Xenossolitarius the reproduction is just an empty nuxt project without anything else.
sorry, guys, just fixed it with uninstalling all node versions, i also had n and nvm installed maybe this caused the problem but it now seems to good again! thank you! ;)
delighted to hear it! 🔥
@danielroe but we found a memory leak with pinia the reproduction is in this ticket, should i make a new one here?
@dissy123 different dependenices/setup, so better create a new issue 👍
Environment
Darwin
v22.7.0
3.13.0
3.13.0
2.9.7
pnpm@8.15.3
-
compatibilityDate
,devtools
-
-
Reproduction
Fresh nuxt 3.13.0 install via npx i tried different node versions like all major version, it is literally happening on every node version. when running with node --inspect .output/server/index.mjs
Describe the bug
Memory Leaking with SSR enabled when doing
ab -n 100 -c 50 "http://localhost:3000/"
Additional context
No response
Logs
No response