Versions
Describe the bug
A 72 byte (If I'm reading this correctly) memory leak caused our server to crash after 3 days
To Reproduce
Steps to reproduce the behavior:
autocannon -c 100 -d 120 http://localhost:3000)Expected behavior
No crashing servers
Demo Link
No demo repo. It's friday at 5pm. If it's needed, I can create one.
Desktop (please complete the following information):
Additional context
AWS memory graph for that server:

Viewing heap snapshots before and after:

Screenshot of Vue instance data:

Maybe this?
::: warning With SSR Frameworks like Nuxt, it is recommended to disable automatic injection since it may cause memory leaks due to all the validator instances being created for every component, which will slow down your site. :::
Injection is disabled.
The file is a little messy. Sorry.
/**
* artoo/plugins/validation.js
* Registers vee-validate. We import the minimal build and only import the rules
* we need. This brings the bundle size down around 50kb.
*
* TODO: When vee-validate gets more module, bring this into the component that
* needs them.
*/
import Vue from 'vue'
import VeeValidate from 'vee-validate'
/**
* TODO: When PR#1264 gets released we can bring the bundle size down about
* 50kb.
*
* https://github.com/baianat/vee-validate/pull/1264/files
*
import VeeValidate from 'vee-validate/dist/vee-validate.minimal.esm.js'
import {
credit_card,
max_value,
max,
min_value,
min,
required
} from 'vee-validate/dist/rules.esm.js'
VeeValidate.Validator.extend(credit_card)
VeeValidate.Validator.extend(max_value)
VeeValidate.Validator.extend(max)
VeeValidate.Validator.extend(min_value)
VeeValidate.Validator.extend(min)
VeeValidate.Validator.extend(required)
*/
Vue.use(VeeValidate, {
inject: false,
})
It should remove the added listeners when the vm is being destroyed. Will investigate and report back
I applied a small fix which should patch the issue temporarily.
A major rewrite is in progress which will employ a single validator instance for the entire app since there is no real benefit of multiple instances except for scoping fields within components.
Most helpful comment
I applied a small fix which should patch the issue temporarily.
A major rewrite is in progress which will employ a single validator instance for the entire app since there is no real benefit of multiple instances except for scoping fields within components.