## 🐛 Bug Report Trying to index documents repeatedly inside a loop causing the warning. ## To Reproduce Steps to reproduce the behavior: Paste your code here: ```js getFiles(basedir).then((files) => { const pattern = /(\d\/\d{1,}\/\d{1,})/; files.forEach(filepath => { fs.readFile(filepath, (err, data )=> { let zxy = filepath.match(pattern)[0]; let base64data = Buffer.from(data).toString('base64'); /* Possible Memory Leak with elasticsearch library */ client.index({ index: 'orders', document:{ zxy, tile: base64data } }) }); }); }); ``` <!-- In some cases, it might be challenging to reproduce the bug in a few lines of code. You can fork the following repository, which contains all the configuration needed to spin up a three nodes Elasticsearch cluster with security enabled. The repository also contains a preconfigured client instance that you can use to reproduce the issue. https://github.com/delvedor/es-reproduce-issue ---> ## Expected behavior Although the documents are indexed, this warning still appears. The warning should not be there. Paste the results here: ```js ``` ## Your Environment - *node version*: 16.13.1 - `@elastic/elasticsearch` latest - *os*: Windows - *any other relevant information*