hakara 100% cpu used

Issue #769 resolved
Mattia created an issue

The service occupies, in the block phase, more than 100% of cpu and stays there, without dying ...

happens at regular 30 minute intervals,
I solved it with "docker-compose restart" but it is not a valid solution.

It all started after the last update: 2.2.21 - 20200604,
now we are back to version: 2.2.19 - 20200319,

hakara still hangs but less frequently ..

the screenshot is what occurs visibly on the interface.
technically port 25 does not respond and therefore no mail arrives!

some idea?

Comments (6)

  1. SH repo owner

    Try latest version, there was multiple internal changes which might solve the issue. If it doesn't help please reopen

  2. Andres Jalinton

    I have the same issue with every email received making the CPU saturated.

    log/s6/haraka-smtp/current:

    2020-12-08 13:50:48.041412500  [INFO] [-] [redis] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:50:48.243265500  [INFO] [-] [redis] connected to redis://127.0.0.1:6379
    2020-12-08 13:50:50.047671500  [INFO] [-] [known-senders] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:50:50.148116500  [INFO] [-] [core] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:50:50.148440500  [INFO] [-] [limit] Disconnected from redis://127.0.0.1:6379/4
    2020-12-08 13:50:50.249403500  [INFO] [-] [known-senders] connected to redis://127.0.0.1:6379
    2020-12-08 13:50:50.349296500  [INFO] [-] [core] connected to redis://127.0.0.1:6379
    2020-12-08 13:50:50.349660500  [INFO] [-] [limit] connected to redis://127.0.0.1:6379/4
    2020-12-08 13:51:02.114695500  [DEBUG] [-] [watch] psubscribed to result-*
    2020-12-08 13:51:02.114730500  [ERROR] [-] [server] watch plugin ran callback multiple times - ignoring subsequent calls
    2020-12-08 13:51:02.115121500  [ERROR] [-] [server] Error
    2020-12-08 13:51:02.115127500      at callback (/usr/lib/node_modules/Haraka/plugins.js:483:34)
    2020-12-08 13:51:02.115128500      at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:273:5
    2020-12-08 13:51:02.115129500      at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13)
    2020-12-08 13:51:02.115130500      at RedisClient.emit (events.js:314:20)
    2020-12-08 13:51:02.115131500      at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14)
    2020-12-08 13:51:02.115132500      at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9)
    2020-12-08 13:51:02.115133500      at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9)
    2020-12-08 13:51:02.115134500      at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18)
    2020-12-08 13:51:02.115134500      at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
    2020-12-08 13:51:02.115135500      at Socket.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:218:27)
    2020-12-08 13:51:24.157006500  [INFO] [-] [karma] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:51:24.358550500  [INFO] [-] [karma] connected to redis://127.0.0.1:6379
    2020-12-08 13:51:34.895291500  [INFO] [-] [watch] client closed:  (1006)
    2020-12-08 13:51:36.487559500  [DEBUG] [-] [watch] wss client connected: _events,_eventsCount,_maxListeners,_binaryType,_closeCode,_closeFrameReceived,_closeFrameSent,_closeMessage,_closeTimer,_extensions,_protocol,_readyState,_receiver,_sender,_socket,_isServer
    2020-12-08 13:51:49.039271500  [INFO] [-] [redis] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:51:49.240254500  [INFO] [-] [redis] connected to redis://127.0.0.1:6379
    2020-12-08 13:51:51.045372500  [INFO] [-] [limit] Disconnected from redis://127.0.0.1:6379/4
    2020-12-08 13:51:51.045483500  [INFO] [-] [core] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:51:51.145739500  [INFO] [-] [known-senders] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:51:51.247202500  [INFO] [-] [limit] connected to redis://127.0.0.1:6379/4
    2020-12-08 13:51:51.247513500  [INFO] [-] [core] connected to redis://127.0.0.1:6379
    2020-12-08 13:51:51.346760500  [INFO] [-] [known-senders] connected to redis://127.0.0.1:6379
    2020-12-08 13:52:25.057034500  [INFO] [-] [karma] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:52:25.258624500  [INFO] [-] [karma] connected to redis://127.0.0.1:6379
    2020-12-08 13:52:36.490072500  [INFO] [-] [watch] client closed:  (1006)
    2020-12-08 13:52:38.068796500  [DEBUG] [-] [watch] wss client connected: _events,_eventsCount,_maxListeners,_binaryType,_closeCode,_closeFrameReceived,_closeFrameSent,_closeMessage,_closeTimer,_extensions,_protocol,_readyState,_receiver,_sender,_socket,_isServer
    2020-12-08 13:52:50.132865500  [INFO] [-] [redis] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:52:50.334446500  [INFO] [-] [redis] connected to redis://127.0.0.1:6379
    2020-12-08 13:52:52.037386500  [INFO] [-] [core] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:52:52.037577500  [INFO] [-] [limit] Disconnected from redis://127.0.0.1:6379/4
    2020-12-08 13:52:52.137679500  [INFO] [-] [known-senders] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:52:52.239284500  [INFO] [-] [core] connected to redis://127.0.0.1:6379
    2020-12-08 13:52:52.239712500  [INFO] [-] [limit] connected to redis://127.0.0.1:6379/4
    2020-12-08 13:52:52.338970500  [INFO] [-] [known-senders] connected to redis://127.0.0.1:6379
    2020-12-08 13:53:02.236046500  [DEBUG] [-] [watch] psubscribed to result-*
    2020-12-08 13:53:02.236058500  [ERROR] [-] [server] watch plugin ran callback multiple times - ignoring subsequent calls
    2020-12-08 13:53:02.236364500  [ERROR] [-] [server] Error
    2020-12-08 13:53:02.236369500      at callback (/usr/lib/node_modules/Haraka/plugins.js:483:34)
    2020-12-08 13:53:02.236371500      at /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-watch/index.js:273:5
    2020-12-08 13:53:02.236372500      at RedisClient.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-redis/index.js:183:13)
    2020-12-08 13:53:02.236373500      at RedisClient.emit (events.js:314:20)
    2020-12-08 13:53:02.236374500      at subscribe_unsubscribe (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:671:14)
    2020-12-08 13:53:02.236375500      at return_pub_sub (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:729:9)
    2020-12-08 13:53:02.236377500      at RedisClient.return_reply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:761:9)
    2020-12-08 13:53:02.236378500      at JavascriptRedisParser.returnReply (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:137:18)
    2020-12-08 13:53:02.236379500      at JavascriptRedisParser.execute (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:544:14)
    2020-12-08 13:53:02.236380500      at Socket.<anonymous> (/usr/lib/node_modules/Haraka/node_modules/redis/index.js:218:27)
    2020-12-08 13:53:26.043621500  [INFO] [-] [karma] Disconnected from redis://127.0.0.1:6379
    2020-12-08 13:53:26.245264500  [INFO] [-] [karma] connected to redis://127.0.0.1:6379
    

    Hope it helps.

  3. Mike DiMeglio

    I’ve been having the same issue for the past few months and need to SIGTERM the haraka processes once every day or two as it saves time from restarting the whole container. For me, the hang up occurs more often in haraka-submission than haraka-smtp, but the end result is the same, so I usually kill both processes just in case.

  4. Log in to comment