"elasticsearch": "^11.0.1"
There seems to be a leak with lodash arrays, filling up memory and causing processes/containers to crash with simple .get() and .mget() operations.
'use strict'
const elasticsearch = require('elasticsearch')
let client = new elasticsearch.Client()
let i = 0
let mget = [{
_id: 'one',
_type: 'test',
_index: 'test-dev',
_source: true
}, {
_id: 'two,
_type: 'test',
_index: 'test-dev',
_source: true
}, {
_id: 'three',
_type: 'test',
_index: 'test-dev',
_source: true
}, {
_id: 'four',
_type: 'test',
_index: 'test-dev',
_source: true
}]
setInterval(() => {
client.mget({
body: {
docs: mget
}
}, (e, r) => {
console.log('interval:', i++, require('util').inspect(process.memoryUsage()))
})
}, 50)
This should be fixed in v13
Most helpful comment
This should be fixed in v13