Events: possible memory leak warning
See original GitHub issueHello,
I am using tens of Recharts on a page and I get the following warning:
(node) warning: possible EventEmitter memory leak detected. 21 listeners added. Use emitter.setMaxListeners() to increase limit.
I noticed that the eventCenter maxListeners are raised to 20 from the default 10. While many libraries set the value to 0
(unlimited; no warning), the best approach I’ve seen so far is dynamically setting the limits.
Any other idea?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to fix possible EventEmitter memory leak detected - cri.dev
The warning possible EventEmitter memory leak detected happens when you have more than 10 listeners (read EventEmitter) attached to an event ...
Read more >possible EventEmitter memory leak detected - node.js
I'd like to point out here that that warning is there for a reason and there's a good chance the right fix is...
Read more >Possible memory leak? · Issue #518 · node-apn/node ... - GitHub
I am trying for several days to figure out the following error: Warning: Possible EventEmitter memory leak detected.
Read more >How To Detect and Prevent Memory Leaks | Scout APM Blog
A memory leak is the gradual loss of available computer memory when a program (an application or part of the operating system) repeatedly...
Read more >Causes of Memory Leaks in JavaScript and How to Avoid Them
A memory leak occurs when an object in memory that is supposed to be cleaned in a garbage collection cycle stays reachable from...
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
😀 OK! I’ll fix this. And only add listener when the chart has props
syncId
which means to be synchronized with some other charts.@xile611 - right, that’s my use case. Many, unsynced charts on one page.