Open dherbolt opened 4 months ago
Looks similar to https://github.com/elastic/elastic-transport-js/issues/63, which is a long-standing issue now, but that is specific to the 8.x client and its use of Undici. Will keep this open and track separately.
In the short term, if this issue is not causing notable memory leak issues for you, you can increase max listeners globally to quiet the warnings.
when a new release will come up?
when a new release will come up?
+1
Please read this entire template before posting any issue. If you ignore these instructions and post an issue here that does not follow the instructions, your issue might be closed, locked, and assigned the
not reproducible
label.🐛 Bug Report
The very first request executes the
product check
procedure. When new requests comes during this check the newproduct-check
event listeners are added.https://github.com/elastic/elasticsearch-js/blob/7.17/lib/Transport.js#L476
The nodeJS warning is then reported:
To Reproduce
Steps to reproduce the behavior: 1) save the code below into file
event-listener.js
1) run codenode --trace-warnings ./event-listener.js
Paste your code here:
Expected behavior
Only the very first request attach the
'product-check'
event listener. The others requests are queued and executed from the event handler for the first request.Paste the results here:
Your Environment
@elastic/elasticsearch
version: 7.17.13