Closed ronag closed 1 year ago
I'm trying to get more info.
Might be related to pipelining.
Getting this warning too đ
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...
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
(node:24750) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 abort listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 abort listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
at _addListener (node:events:585:17)
at EventEmitter.addListener (node:events:603:10)
at addSignal (node_modules/undici/lib/api/abort-signal.js:35:19)
at new RequestHandler (node_modules/undici/lib/api/api-request.js:68:5)
at Pool.request (node_modules/undici/lib/api/api-request.js:170:25)
at node_modules/undici/lib/api/api-request.js:163:15
at new Promise (<anonymous>)
at Pool.request (/node_modules/undici/lib/api/api-request.js:162:12)
at Connection.request (node_modules/@elastic/transport/lib/connection/UndiciConnection.js:143:41)
at SniffingTransport.request (node_modules/@elastic/transport/lib/Transport.js:412:75)
at Client.GetApi [as get] (node_modules/@elastic/elasticsearch/lib/api/api/get.js:36:33)
// my code
{
emitter: EventEmitter {
_events: [Object: null prototype] { abort: [Array] },
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false
},
type: 'abort',
count: 11
}
This was fixed and released in v8.8.1. See https://github.com/elastic/elastic-transport-js/issues/63.
I'm running into this currently, using @elastic/elasticsearch
8.13.1 and @elastic/transport
8.5.1. It seems the issue is unresolved.
Thanks for linking to that issue @daveyarwood. I'll take another look and continue to keep track over on https://github.com/elastic/elastic-transport-js/issues/63.
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?