-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Huge Memory leak If the "meta" option is set true #94
Huge Memory leak If the "meta" option is set true #94
Comments
Is there any more information other than package json? I am investigating a similar issue but not sure where does it originate. As far as I noticed by running heap profiler, the most amount of memory is consumed by marking beforeCreate() {
vue2_bridge["default"].util.defineReactive(this, "nuxt", this.$root.$options.nuxt);
} This is coming somewhere from the Nuxt component. Definitely not a good idea to mark something reactive over and over again without memory clean-up. Additionally, I noticed that the flame graphs make a monstrous amount of Currently this is a critical issue, as rendering a very simple page consisting of header/footer and client-only-rendered content allocates 270 MB of memory. I honestly don't understand why is there reactivity on SSR? |
I tried with Extra: I removed all useMeta({...}) functions in my code and i tried again it still crashes. I mean i only set the meta option true. Am I doing something wrong? @danielroe @phoenix-ru i think there's no extra information need for now(maybe nuxt.config?). because i just only set the meta option true and i didn't use "useMeta" nowhere and the problem still exist. |
@antlionguard I was somehow able to get it running without memory leak after the recent commits. However, I can't reproduce it and memory leak is back. It is not that obvious what is leaking now, as reactivity allocations are gone from heap profile and server can now handle 3K requests instead of 2K. What I still don't understand though is why simple rendering of Vue SSR causes so much recursive calls (again, originating from |
Yes, we resolved a memory leak in the linked PR. The current leak is due to using a Vue 3 library (vueuse/head) and registering it per request if |
Hello, it's me again :( I tried again with new version after nuxt/framework#3898 pr. The problem still exist when i set meta option true. nuxt.config.ts bridge settings. bridge: {
autoImports: true,
nitro: false,
meta: true
} My @nuxt/bridge-edge version from
Is there an extra information you want from me? @danielroe @pi0 |
@antlionguard Thanks - following up with a PR on that mixin: nuxt/framework#3900. |
There's something broke after this PR. I got this error in my all pages. Should i open new issue for these errors? |
@antlionguard Yes please. 🙏 |
Environment
Darwin
v14.17.6
2.16.0-27358576.777a4b7f
yarn@1.22.17
Webpack
alias
,server
,bridge
,head
,loading
,css
,styleResources
,plugins
,buildModules
,gtm
,env
,modules
,postcss
,tailwindcss
,typescript
,sentry
,buefy
,axios
,proxy
,render
,redirect
,i18n
,router
,build
@nuxtjs/sentry@5.1.7
,nuxt-buefy@0.3.31
,@nuxtjs/axios@5.13.6
,@nuxtjs/proxy@2.1.0
,cookie-universal-nuxt@2.1.5
,@nuxtjs/i18n@7.2.0
,nuxt-sweetalert2@1.0.0
@nuxtjs/eslint-module@3.0.2
,@nuxtjs/style-resources@1.2.1
,@nuxtjs/gtm@2.4.0
,@pinia/nuxt@0.1.8
,unplugin-vue2-script-setup/nuxt
,@nuxtjs/tailwindcss@4.2.1
,@nuxtjs/dotenv@1.4.1
,@nuxt/bridge@3.0.0-27398533.8edd481
Reproduction
Here's my package json
Starting procedure
Describe the bug
If the "meta" option is set true memory usage exceeds 2000mb and the application crashes.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: