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

Got message "(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 abort listeners added to [EventEmitter]" when deploy in k9s and scale up to more than one repica

Open Sirichakorn opened this issue 3 years ago • 2 comments

Got message "(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 abort listeners added to [EventEmitter]" and then log don't send to elasticsearch.

winston-elasticsearch version 0.17.1 my config

const esTransportOpts = {
      level: ('info'),
      indexPrefix: 'app',
      clientOpts: {
        node: 'https://localhost:9200',
        auth: {
          username: 'xxx',
          password: 'xxx'
        },
        caFingerprint: 'xx:xx:xx',
        tls
          rejectUnauthorized: false
        }
      }
    };
    const esTransport = new ElasticsearchTransport(esTransportOpts);

Has anyone encountered it and how did you fix it?

Sirichakorn avatar Nov 28 '22 09:11 Sirichakorn

https://github.com/elastic/elasticsearch-js/issues/1716

PotcFdk avatar Jul 26 '23 15:07 PotcFdk

The problem was solved in @elastic/transport v8.5.2 which can use with @elastic/elasticsearch v8.14.0, please update dependency

Here u can read about: @elastic/elastic-transport 8.5.2 - updating to that version fixed my issue.

has been merged and deployed in v8.5.2

@elastic/transport v8.6.0 using in >8.14.0

fudoggg avatar Jul 30 '24 08:07 fudoggg