Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with karma and redis #2308

Closed
frank-bn opened this issue Dec 8, 2017 · 3 comments · Fixed by haraka/haraka-plugin-redis#13
Closed

Problem with karma and redis #2308

frank-bn opened this issue Dec 8, 2017 · 3 comments · Fixed by haraka/haraka-plugin-redis#13

Comments

@frank-bn
Copy link

frank-bn commented Dec 8, 2017

system info

Haraka Haraka.js — Version: 2.8.16
Node v6.12.0
OS Linux dione 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
openssl OpenSSL 1.0.2g 1 Mar 2016
redis Server 3.0.6
haraka-karma 1.0.11
haraka-redis 1.0.7

Expected behavior

Karma plugin should be running without redis errors

Observed behavior

1) Test without(!) adding and enabling redis in config/plugins
Plugins like greylist and limit connect to redis and seem to work.
On Haraka startup karma shows:
[karma] connected to redis://127.0.0.1:6379 v3.0.6
But on receiving the first incoming mail the log displays:
[karma] karma requires the redis plugin

2) Test with adding and enabling redis in config/plugins
Haraka startup without any problems. Redis connections seem to work.
After receiving mails for several hours executing:
redis-cli info clients
shows:
connected_clients:4064
Nearly all connections are on redis db=0.
Because of the default redis maxclients setting on my server the next incoming mail causes:

[CRIT] [-] [core] ReplyError: Ready check failed: ERR max number of clients reached
[CRIT] [-] [core]     at parseError (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:193:12)
[CRIT] [-] [core]     at parseType (/usr/lib/node_modules/Haraka/node_modules/redis-parser/lib/parser.js:303:14)
[NOTICE] [-] [core] Shutting down

Checking the number of clients with cli:
redis-cli info clients
ERR max number of clients reached

This problem seems similar or is maybe the same I had when trying Haraka the first time. See my issue #1955
Is there something wrong with my configuration?

Steps to reproduce

see my system info

@msimerson
Copy link
Member

I'll update my system soon and see if I can't reproduce. Today, I can't:

  • redis-cli info clients: 21
  • redis server: 3.2.10
  • node: 6.11.5
  • Haraka: 2.8.16

@msimerson
Copy link
Member

msimerson commented Dec 30, 2017

Hi @frank-bn , I've created a small PR against haraka-plugin-redis that I think will resolve behavior # 2 for you.

@msimerson
Copy link
Member

Update: on a server that exhibited behavior 2 above, I applied this patch and after running half a day:

root@mail:~ # redis-cli info clients
# Clients
connected_clients:14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants