elasticsearch-js icon indicating copy to clipboard operation
elasticsearch-js copied to clipboard

Abort signal - Possible EventEmitter memory leak detected. 11 abort listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit

Open ronag opened this issue 3 years ago • 5 comments

When using abort signal with the esc client I get the following:

Possible EventEmitter memory leak detected. 11 abort listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit

Is esc or maybe undici missing to release the abort signal handler?

ronag avatar Jun 21 '22 10:06 ronag

I'm trying to get more info.

ronag avatar Jun 21 '22 11:06 ronag

Might be related to pipelining.

ronag avatar Jun 21 '22 11:06 ronag

Getting this warning too 👍

netlob avatar Jun 26 '22 22:06 netlob

So this has nothing to do with abort signal. It has to do with number of concurrent requests without signals.

https://github.com/elastic/elastic-transport-js/blob/main/src/connection/UndiciConnection.ts#L126

Every request without signal adds an abort listener to the connection. This is not optimal...

ronag avatar Jun 27 '22 10:06 ronag

Estou recebendo o mesmo aviso aqui também.

Não sei se essa issue pode ajudar em algo: https://github.com/node-fetch/node-fetch/issues/1295

Czpla avatar Jun 28 '22 12:06 Czpla