(node) warning: possible EventEmitter memory leak detected. 11 job ttl exceeded ack listeners added
See original GitHub issue(node) warning: possible EventEmitter memory leak detected. 11 job ttl exceeded ack listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at Queue.addListener (events.js:239:17)
at Queue.on (/mnt/app/node_modules/kue/lib/kue.js:130:13)
at Command.callback (/mnt/app/node_modules/kue/lib/kue.js:234:16)
at RedisClient.return_reply (/mnt/app/node_modules/redis/index.js:664:25)
at HiredisReplyParser.reply_parser.send_reply (/mnt/app/node_modules/redis/index.js:332:14)
at HiredisReplyParser.execute (/mnt/app/node_modules/redis/lib/parsers/hiredis.js:30:18)
at Socket.<anonymous> (/mnt/app/node_modules/redis/index.js:131:27)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at TCP.onread (net.js:523:20)
Is this warning just related to the number of jobs that have TTL expiring? We can use emitter.setMaxListeners() to increase this value and prevent the warning, but I’m curious about the root cause.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:7
- Comments:30 (1 by maintainers)
Top Results From Across the Web
Possible EventEmitter memory leak detected. 11 message lis ...
I know this might flag as a duplicate solution but the solution on stack overflow is not working for me. Problem (node:5716) ...
Read more >(node) warning: possible EventEmitter memory leak detected. 11 job ...
(node) warning: possible EventEmitter memory leak detected. 11 job ttl exceeded ack listeners added. Use emitter.setMaxListeners() to increase limit.
Read more >Understanding memory leaks in node.js part 2 - alxolr
(node:10031) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. Eleven event listeners added. Use emitter.
Read more >OptimalBits/bull - Gitter
its not really a memory leak, just a warning since you have listening more than 11 times to one event. Its just a...
Read more >Node.js Memory Leak Detection: How to Debug & Avoid Them
The use of setTimeout, setInterval, Observers, and event listeners can cause memory leaks when heavy object references are kept in their ...
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
I’m running into the same warning when the total amount of jobs (their concurrency value actually) exceeds 10. It doesn’t seem to be anything bad, only a warning, but it’s quite annoying seeing this poping up.
@Shadowys The warning isn’t an issue in this use case. You’re expecting over ten event listeners, so it’s not a memory leak.
You can do some prototype hacks to avoid the error: