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
Redis in custom plugins #354
Comments
FWIW we thought the error should be caught by the try/catch block, but the connection happens asynchronously so it throws from the event loop, crashing the server. We now only try and connect to redis if stats are enabled. It also allows you to set the redis host. I'll push out 2.2.1 soon. |
@baudehlo It's default "error" event handler in node-redis library that throws an exception. You could add custom handler which prevents exception from being thrown.
|
OK I've added in support for the error handler, but for now it just logs The node redis library should re-try the connection if it fails, so I'll On Thu, Aug 22, 2013 at 10:27 AM, Dmitry Gorbunov
|
@baudehlo Thank you. |
When custom plugin uses redis, dns_list_base assumes that redis is available and tries to connect to localhost which leads to an error if redis is on separate machine. Disabling stats in dnsbl.ini/dnswl.ini does not help at all — dns_list_base still tries to connect to redis.
Either add redis configuration option to dns_list_base or option to disable redis functionality completely. Another option is handle the redis connection error (why didn't you do that? it throws and whole server dies!) and if connection could not be established, decide that local redis is not present after all.
Assuming availability based on sole npm module installed or not is horribly wrong.
The text was updated successfully, but these errors were encountered: