fonoster/goodtok

[BUG]: Possible EventEmitter memory leak detected

psanders opened this issue · 0 comments

What happened?

We are currently observing the following logs in the APIServer due to a bug in a dependency. The error is similar to the following:

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace: 
    at EventEmitter.<anonymous> (events.js:139:15)
    at EventEmitter.<anonymous> (node.js:385:29)
    at Server.<anonymous> (server.js:20:17)
    at Server.emit (events.js:70:17)
    at HTTPParser.onIncoming (http.js:1514:12)
    at HTTPParser.onHeadersComplete (http.js:102:31)
    at Socket.ondata (http.js:1410:22)
    at TCP.onread (net.js:354:27)

This issue occurs when the getLogger function is called more than 31 times.

Steps to reproduce

Start the API Server and monitor the console.

Expected behavior

We should be able to import the logger as much as needed without seeing this warning.

Additional context

The issue will need to be fix at @fonoster/logger