You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do lots of searches at the same time, I'll get the following error:
(node:2868) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 abort listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
It seems the client will establish a new socket connection to elasticsearch server on every search, so the number of connections will keep going up and exceed events.EventEmitter.defaultMaxListeners. Is it possible to limit the whole connections esClient can have and reuse existing ones?
Your Environment
node version: v16.13.1
@elastic/elasticsearchversion: >=8.1.0
os: Windows
The text was updated successfully, but these errors were encountered:
I removed the warning by adding in the TransportRequestOptions for the signal field a new AbortController().signal;, here an example client.search( { yourQuery }, { signal: new AbortController().signal, } Any problem attached to this workaround to remove the warning ?
🐛 Bug Report
When I do lots of searches at the same time, I'll get the following error:
To Reproduce
Steps to reproduce the behavior:
Paste your code here:
Expected behavior
It seems the client will establish a new socket connection to elasticsearch server on every search, so the number of connections will keep going up and exceed
events.EventEmitter.defaultMaxListeners
. Is it possible to limit the whole connections esClient can have and reuse existing ones?Your Environment
@elastic/elasticsearch
version: >=8.1.0The text was updated successfully, but these errors were encountered: