memory leak with `useHead`
See original GitHub issueEnvironment
Netlify lambda
Reproduction
https://github.com/Rigo-m/bridge-nitro-generate-sourcemaps -> Bridge https://github.com/atoms-studio/netlify-odb-cache -> Nuxt3
- create a netlify site for each
- take a peek at function/server log
- hit some random slugs to generate pages via on demand builder (e.g.: your-netlify-handle.netlify.app/1, your-netlify-hande.netlify.app/2
Describe the bug
Nuxt3 is better than bridge, but it seems like there is some sort of memory leak. Lambda’s memory keeps raising every time you invoke a new web page (already invoked ones are cached via on demand builders). In a big website we’ve made with bridge, lambda crashes every once in a while because of memory impairments.
Here’s a log example: https://pastebin.com/bsY1bpwf
Additional context
No response
Logs
https://pastebin.com/bsY1bpwf
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Nuxt 3: SSR memory leak in `useHead()` with computed getter ...
Computed getter in useHead() from nuxt-hedge. Production build of an application, 60 requests per second, 10 minutes of load (36 000 requests).
Read more >Memory leak: How to avoid it in Vue js - ArrowHiTech
Memory leaks in Vue applications do not typically come from Vue itself, rather they can happen when incorporating other libraries into an application....
Read more >LeakDetect: Free Memory Leak Detection Tool - uberAgent
Today is such a happy day: we proudly announce LeakDetect, a new Windows memory instrumentation tool that helps detect memory leaks in ...
Read more >@nuxt/bridge-edge - npm
Nuxt Bridge provides a new Nuxt 3 meta API that can be accessed with a new useHead composable. ... This useHead composable uses...
Read more >250226 – graphics/drm-fbsd12.0-kmod: massive memory leak
Bug 250226 - graphics/drm-fbsd12.0-kmod: massive memory leak ... (In reply to Scott Bennett from comment #1) I use HEAD and vm_max_wired no longer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
我也遇到内存泄露 在alinode排查时发现 allHeadObjs 这个可疑点
https://github.com/vueuse/head/issues/36 这个好像也是相似的错误
@Rigo-m @danielroe I have a memory leak problem, through alinode monitoring, get the HeapSnapshot file, analysis found that “Set” object and “ReactiveEffect” object can be suspicious.
Heapsnapshot analysis shows that there are many ”meta2“
Here does not need to use ref ?