- changed status to resolved
Possible EventEmitter memory leak detected
Since a couple of days I see that my poste docker is using 100% CPU load.
It is running correctly for some time, and after a while (do not know exactly how long) the CPU load goes up.
Looking at the docker log, I see the following error:
(node:1108) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit
at _addListener (events.js:389:17)
at RedisClient.addListener (events.js:405:10)
at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18
at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13)
at RedisClient.emit (events.js:314:20)
at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14)
at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9)
at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9)
at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18)
at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
(node:1096) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit
at _addListener (events.js:389:17)
at RedisClient.addListener (events.js:405:10)
at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18
at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13)
at RedisClient.emit (events.js:314:20)
at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14)
at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9)
at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9)
at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18)
at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
I'm running version 2.2.26 FREE of Poste.io on Docker version 19.03.14
Comments (16)
-
repo owner -
reporter - changed status to open
After updating to 2.2.27 FREE still the same error:
[services.d] done. (node:1159) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit at _addListener (events.js:389:17) at RedisClient.addListener (events.js:405:10) at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18 at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13) at RedisClient.emit (events.js:314:20) at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14) at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9) at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9) at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18) at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14) (node:1170) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit at _addListener (events.js:389:17) at RedisClient.addListener (events.js:405:10) at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18 at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13) at RedisClient.emit (events.js:314:20) at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14) at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9) at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9) at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18) at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
-
Hello,
I have the same error (i downloaded yesterday latest image):
(node:693) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit
at _addListener (events.js:389:17)
at RedisClient.addListener (events.js:405:10)
at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18
at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13)
at RedisClient.emit (events.js:314:20)
at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14)
at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9)
at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9)
at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18)
at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
(node:688) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit
at _addListener (events.js:389:17)
at RedisClient.addListener (events.js:405:10)
at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18
at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13)
at RedisClient.emit (events.js:314:20)
at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14)
at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9)
at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9)
at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18)
at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
Container stop so NO mail service for 13 hours…….. , is it a good idea to use “
--restart=always
“ or any other restart method ? (documentation says nothing)
Regards.
-
reporter I still have these errors in the log.
I’m now running version 2.2.30
(node:1568) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit at _addListener (events.js:389:17) at RedisClient.addListener (events.js:405:10) at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18 at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13) at RedisClient.emit (events.js:314:20) at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14) at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9) at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9) at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18) at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14) (node:1572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit at _addListener (events.js:389:17) at RedisClient.addListener (events.js:405:10) at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18 at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13) at RedisClient.emit (events.js:314:20) at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14) at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9) at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9) at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18) at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
-
I also encountered these problems. When I send a lot of emails, I get stuck and cannot send. I have to restart docker to restore it to normal.
-
Same here … the error keeps coming up in latest docker image.
-
Same problem. with latest image version
mailserver | (node:658) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit
mailserver | at _addListener (events.js:389:17)
mailserver | at RedisClient.addListener (events.js:405:10)
mailserver | at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18
mailserver | at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:179:13)
mailserver | at RedisClient.emit (events.js:314:20)
mailserver | at RedisClient.on_error (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:341:14)
mailserver | at Socket.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:222:14)
mailserver | at Socket.emit (events.js:314:20)
mailserver | at emitErrorNT (internal/streams/destroy.js:92:8)
mailserver | at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
mailserver | (node:669) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit
mailserver | at _addListener (events.js:389:17)
mailserver | at RedisClient.addListener (events.js:405:10)
mailserver | at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18
mailserver | at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:179:13)
mailserver | at RedisClient.emit (events.js:314:20)
mailserver | at RedisClient.on_error (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:341:14)
mailserver | at Socket.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:222:14)
mailserver | at Socket.emit (events.js:314:20)
mailserver | at emitErrorNT (internal/streams/destroy.js:92:8)
mailserver | at emitErrorAndCloseNT (internal/streams/destroy.js:60:3) -
same here:
docker logs --tail=100 mail
(node:2759) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit
at _addListener (events.js:389:17)
at RedisClient.addListener (events.js:405:10)
at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18
at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13)
at RedisClient.emit (events.js:314:20)
at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14)
at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9)
at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9)
at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18)
at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
(node:2758) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit
at _addListener (events.js:389:17)
at RedisClient.addListener (events.js:405:10)
at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18
at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13)
at RedisClient.emit (events.js:314:20)
at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14)
at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9)
at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9)
at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18)
at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14) -
reporter Error still exists after updating to Version 2.3.0
[services.d] done. (node:1381) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit at _addListener (events.js:389:17) at RedisClient.addListener (events.js:405:10) at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18 at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13) at RedisClient.emit (events.js:314:20) at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14) at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9) at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9) at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18) at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14) (node:1385) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pmessage listeners added to [RedisClient]. Use emitter.setMaxListeners() to increase limit at _addListener (events.js:389:17) at RedisClient.addListener (events.js:405:10) at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:148:18 at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13) at RedisClient.emit (events.js:314:20) at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14) at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9) at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9) at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18) at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
-
Running into the same issue on latest.
This might be related: Every two minutes, I receive this error from haraka-smtp:
2021-10-10 04:00:01.873894500 [INFO] [-] [redis] Disconnected from redis://127.0.0.1:6379 2021-10-10 04:00:01.883697500 [INFO] [-] [karma] Disconnected from redis://127.0.0.1:6379 2021-10-10 04:00:02.076214500 [INFO] [-] [redis] connected to redis://127.0.0.1:6379 2021-10-10 04:00:02.085518500 [DEBUG] [-] [watch] psubscribed to result-* 2021-10-10 04:00:02.085596500 [ERROR] [-] [server] watch plugin ran callback multiple times - ignoring subsequent calls 2021-10-10 04:00:02.086628500 [ERROR] [-] [server] Error 2021-10-10 04:00:02.086647500 at callback (/usr/lib/node_modules/Haraka/plugins.js:482:34) 2021-10-10 04:00:02.086651500 at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:273:5 2021-10-10 04:00:02.086655500 at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13) 2021-10-10 04:00:02.086658500 at RedisClient.emit (events.js:314:20) 2021-10-10 04:00:02.086661500 at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:672:14) 2021-10-10 04:00:02.086664500 at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:730:9) 2021-10-10 04:00:02.086667500 at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:762:9) 2021-10-10 04:00:02.086670500 at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:138:18) 2021-10-10 04:00:02.086673500 at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14) 2021-10-10 04:00:02.086675500 at Socket.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:219:27) 2021-10-10 04:00:02.087963500 [INFO] [-] [karma] connected to redis://127.0.0.1:6379
If you need more infos I’d be willing to help debug this
-
Same issue on Version 2.3.4 FREE # 1507
-
In the past this issue caused Poste to crash completely, but they’ve been attempting workarounds at least in:
2.2.23 - 20200925
- regularly clear redis pubsub connections
2.2.20 - 20200603
- fix redis subscribed connections overflow
These previous fixes allowed our production mail servers to stay up and running but the “
Possible EventEmitter memory leak detected”
errors have continued ever since.Preferred result would be to fix the root cause of these errors completely.
Currently running:
Version 2.3.4 PRO # 1507
-
2021-12-28 18:30:01.839450500 [ERROR] [-] [server] watch plugin ran callback multiple times - ignoring subsequent calls 2021-12-28 18:30:01.839451500 [ERROR] [-] [server] Error 2021-12-28 18:30:01.839452500 at callback (/usr/lib/node_modules/Haraka/plugins.js:482:34) 2021-12-28 18:30:01.839453500 at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:273:5 2021-12-28 18:30:01.839454500 at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13) 2021-12-28 18:30:01.839455500 at RedisClient.emit (events.js:314:20) 2021-12-28 18:30:01.839456500 at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:672:14) 2021-12-28 18:30:01.839457500 at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:730:9) 2021-12-28 18:30:01.839458500 at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:762:9) 2021-12-28 18:30:01.839459500 at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:138:18) 2021-12-28 18:30:01.839460500 at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14) 2021-12-28 18:30:01.839461500 at Socket.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:219:27) 2021-12-28 18:30:01.847539500 [INFO] [-] [limit] connected to redis://127.0.0.1:6379/4
The time has come, this caused multiple instances of Poste.io to stop working (see issue #913 and probably some others), without even crashing. Maybe this log could be of some help. It’s from Haraka SMTP and happens once every about 2 minutes give/take a bit of time.
-
Hi,
I am having the same issue error logs as Samuel in both haraka-smtp and haraka-submission which doesn’t seem to block email delivery but the UI isn’t able to pickup the live emails on the admin landing page.Version 2.3.6 FREE # 1656
Is there a separate issue already open for this error or does it need to be created ?
Thx
-
repo owner - changed status to resolved
Please try latest 2.3.7 - it should be solved, if not please open new issue
-
Correct, the Version 2.3.7 FREE # 1715 got deployed while I was writing my comment.
Now everything is working, thank you so much - Log in to comment
Please try latest, please reopen if this doesn't solve your issue