N
Nuxt2mo ago
stefanVDW

Memory leak Nuxt 3.11.2

Since upgrading from 3.9 to 3.11.2 I've been seeing a memory leak where even after a few requests from both my laptop and my phone the memory uages jumps up to +-750mb. I've been looking at memory heap snapshots locally but the issue doesn't seem to happen locally (I can get it up to +-50mb after hitting it with 1000 requests using ab). My package.json file looks like:
{
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxtjs/supabase": "^1.0.2",
"@nuxtjs/tailwindcss": "^6.8.0",
"nuxt": "^3.6.5",
"nuxt-icon": "^0.6.9",
"prettier-plugin-tailwindcss": "^0.5.11"
},
"dependencies": {
"@nuxt/image": "^1.0.0-rc.1",
"@nuxtjs/plausible": "^1.0.0",
"@pinia/nuxt": "^0.5.1",
"@stripe/stripe-js": "^3.4.0",
"@vee-validate/nuxt": "^4.12.4",
"@vee-validate/yup": "^4.12.4",
"@vuepic/vue-datepicker": "^8.6.0",
"@vueuse/core": "^10.9.0",
"date-fns": "^3.6.0",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"nosleep.js": "^0.12.0",
"parse-ingredient": "^1.0.1",
"pinia": "^2.1.7",
"stripe": "^15.6.0",
"vue-marquee-text-component": "^2.0.1"
},
"overrides": {
"vue": "latest"
}
}
{
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxtjs/supabase": "^1.0.2",
"@nuxtjs/tailwindcss": "^6.8.0",
"nuxt": "^3.6.5",
"nuxt-icon": "^0.6.9",
"prettier-plugin-tailwindcss": "^0.5.11"
},
"dependencies": {
"@nuxt/image": "^1.0.0-rc.1",
"@nuxtjs/plausible": "^1.0.0",
"@pinia/nuxt": "^0.5.1",
"@stripe/stripe-js": "^3.4.0",
"@vee-validate/nuxt": "^4.12.4",
"@vee-validate/yup": "^4.12.4",
"@vuepic/vue-datepicker": "^8.6.0",
"@vueuse/core": "^10.9.0",
"date-fns": "^3.6.0",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"nosleep.js": "^0.12.0",
"parse-ingredient": "^1.0.1",
"pinia": "^2.1.7",
"stripe": "^15.6.0",
"vue-marquee-text-component": "^2.0.1"
},
"overrides": {
"vue": "latest"
}
}
I've read everything I can find about memory leaks in Nuxt but none of the posed solutions work for me. I don't use i18n or vuetify and I don't have a loading indicator. The website does have a large number of pages though (it's a recipe website), could that be the issues? What would be a good way to tackle this issue? Any advice would be appriciated!
No description
2 Replies
manniL
manniL2mo ago
hard to tell without the whole code and checking it most likely user code 🙂
stefanVDW
stefanVDW2mo ago
Right, the code base is closed source and I'm having trouble recreating the leak. But the reason I came here to ask is that no user code changes have been made. Only the update to 3.11.2. There were a few libs that caused memory leaks for some people such as i18n, vuetify and formkit so I was hoping there was an obvious culprit in my package.json.
I'll keep trying recreating it