SSR Memory Leak
See original GitHub issueModule versions (please complete the following information):
vue
:v2.4.1vue-i18n
:v8.24.2
Question
My Project is using Vue SSR, when tests stress by the ab tool, the memory increases all the time. But when I remove the vue-i18n and tests again, the memory does not increase. So I guess the vue-i18n exists ssr memory leak, what I want to ask that is there anyone has the same question and how to solve? Thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Learn How to Debug the Cause of Memory Leak in SSR
To find the causes of memory leaks, it is efficient to take a look at the very large retained size for shallow size....
Read more >Hunting memory leaks in a server side rendered React ...
Our memory leak was caused by reselect and with the bad usage of styled-components, both problems were found by using Chrome DevTools. Backstory....
Read more >Memory leak when using computed is SSR mode · Issue #5208
A leak would be if you destroyed all of these Posts again and memory usage would not decrease to the same level.
Read more >Debugging Memory Leaks in Node.js Applications - Toptal
Memory leaks in long running Node.js applications are like ticking time bombs that, if left unchecked in production environments, can result in devastating ......
Read more >Server-Side Rendering Coding Guidelines - Spartacus ... - SAP
Avoiding Memory Leaks in SSR ... In the SSR server, there is one long-living Node.js process that handles all HTTP requests. On each...
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
@0Rick0 Thank you for your repro repo!
It’s very hard to make the memory leaks reproduce. We appreciate your information.
The memory leaks might be affected by the javascript code, and with Vue core code. So, please understand that it will take some time to fix.
We’ve seen a similar issue crop up in our application. Taking a heap dump of the application during a stress test there where a lot of watchers on the VueI18n object.
We’ve solved this by patching out the watchI18nData method after calling it once. I will see if I can post a minimal example later this week.
I’m not entirely sure if it has any other side effects that I’m not aware of. But as I understand the
this._vm.watch('$data', () => {})
only needs to be created once.The patch we used: