Memory leaking (?) when using SSR
See original GitHub issueVersions:
- VueJs: 2.1.8
- Vee-Validate: 2.0.0-beta.18
Description:
I noticed some memory leaking, i think, in my app when doing loadtests. This was solved when removing vee-validate from the server rendering. So, essentially removing Vue.use(VeeValidate)
fixed the “leak”.
I don’t know if the term “leak” is correct here, but it seems like a leak.
I guess this is also leaking when using Vue on the client. But i don’t have time to prove that.
Steps To Reproduce:
Take the Hackernews 2.0 example, i’ve added vee-validate in this fork: https://github.com/jvandenaardweg/vue-hackernews-2.0
Install it, then run:
npm run build
npm start
Then, open up a new console window and do a loadtest:
npm install -g loadtest
loadtest -n 2000 http://localhost:8080/top
You’ll notice in the console that the latency going up. When you remove Vue.use(VeeValidate)
, run npm run build, run npm start and run the loadtest again, the latency stays stable.
Using vee-validate in combination with SSR seems weird and, i guess, not needed actually. I only load vee-validate in the client now and thats all fine. But, my guess is if it happens on the server, there’s a possibility it happens on the client as well.
I hope someone can investigate further, because this is an awesome library 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
Good news! I’ve updated my code to the latest beta (2.0.0-beta.23) (came from beta.18) and it all seems fixed now. A simple SSR loadtest with VeeValidate enabled now seems stable!
I’ve tried untill beta.21 by plugging it in and load testing it. However, i just recently had the time to rewrite my app to work with the changes introduced in beta 19.
Still don’t know what it was then.
Thanks for looking into it though. Good work with this library, love it!
(below: it would crash my app after about 1000 requests, now its stable well beyond that)
Thanks for reporting this, I will try to investigate it although I’m not an expert. so any help will be appreciated.