Worker did not remove the event listener when it ended.
See original GitHub issueHi, I’ve found the following warning message.
(node:80974) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 21 end listeners added to [Redis].
Use emitter.setMaxListeners() to increase limit
And then investigated it. As a result, First, the multi-worker had been running one or two if the queue is empty. Second, Each worker added the event listener into the Redis when the worker started. Finally, any worker did not remove the event listener when it ended.
As the time goes the event listener adds infinitely.
I think when the worker ends - in the end
method of the worker, it should remove the event listener in the Redis.
Please let me know your opinion. Thanks.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Javascript removeEventListener not working - Stack Overflow
In a React function component, make sure to define the callback with the useCallback(() => {}) hook. If you fail to do this,...
Read more >EventTarget.removeEventListener() - Web APIs | MDN
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.
Read more >Events | Maps JavaScript API - Google Developers
To remove a specific event listener, it must have been assigned to a variable. You can then call removeListener() , passing the variable...
Read more >Why didn't remove event listener work? - Reddit
When you add an event handler function using addEventListener , you need to pass that exact function to removeEventListener to remove it. In ......
Read more >Events | Node.js v19.3.0 Documentation
If an EventEmitter does not have at least one listener registered for the 'error' ... The 'removeListener' event is emitted after the listener...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Amazing - please submit a PR with the fix, and I’ll get a release out quickly!
I’m not sure I have enough familiarity w/ the codebase to contribute atm 😦