MaxListenersExceededWarning
Closed this issue · 9 comments
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 connect listeners added. Use emitter.setMaxListeners() to increase limit
const results = await push.send(devices, data);
console.log('Push results', results);
Why i get memory leak detected?
What i need to change?
Hm, possible duplicate of #70 ?
We thought/hoped the issue was fixed. Which version of the library are you using? the most recent one?
I have the library node-pushnotifications@1.2.1. I needed to add this to solve error message. But is it the right solution?
require('events').EventEmitter.defaultMaxListeners = 0;
I wouldn't recommend that solution, since it changes the default value for all event emitters in your application (https://nodejs.org/api/events.html#events_eventemitter_defaultmaxlisteners)
Not sure myself how to proceed with this issue. Maybe the warning can even safely be ignored? Do oyu have profiling data on the memory usage of your application?
Maybe the warning can even safely be ignored?
Can i really ignore this? I have only 12 deviceIds in the DB and sending. If i need to send 10k what will happen?
Somebody here?
Sorry. From what I understand it's an issue with node-apn and nothing we can fix in this library? Did you open an issue there?
OK, let me do a request issue on node-apn.
@bjoern2610 do you still experince this issue with the latest release?
Closing this for inactivity, as it does not seem to be an issue for any other users. Please re-open if issue persists