NuxtN
Nuxt2y ago
3 replies
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"
  }
}


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!
image.png
Was this page helpful?