question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Memory leaking (?) when using SSR

See original GitHub issue

Versions:

  • 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:closed
  • Created 7 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jvandenaardwegcommented, Mar 4, 2017

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)

screen shot 2017-03-04 at 20 38 26
1reaction
logaretmcommented, Jan 16, 2017

Thanks for reporting this, I will try to investigate it although I’m not an expert. so any help will be appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Learn How to Debug the Cause of Memory Leak in SSR
After migrating to SSR, just found out there was a memory leak. I believe it is a really good opportunity to face lots...
Read more >
Hunting memory leaks in a server side rendered React ...
Imagine that you have a global variable and after every SSR you will reset this variable. This would not be a problem until...
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 >
SSR memory leaks - help - Meteor forums
I'm getting a severe memory leak on Galaxy if I leave my SSR code. It causes my app to restart every half our...
Read more >
Memory Leak in server.js | React / Express / SSR
To check the memoryleak I am forcing garbage collection every 3 seconds and print out the memory usage while using autocannon to make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found