redis problems

Mark Martinec Mark.Martinec+amavis at
Sat Jul 5 14:53:38 CEST 2014


>>>> Jul  5 10:59:57 mx amavis[26363]: (26363-02) (!!)TROUBLE in check_mail:
>>> redis_ip_repu FAILED: Can't use string ("OK") as an ARRAY ref
>>> while "strict refs" in use at (eval 132) line 484, <GEN44> line 8.
>>> <— Not sure what that means
>> That's strange. Looks like a redis status reply, instead of a
>> ref to table reply, as expected to be a result of an EVALSHA
>> command. Perhaps it could be a leftover from some previous failure
>> with redis?
> Difficult to say. The log was full with these errors.
>> Does it happen with every message of just occasionally?
>> Search the log at debug level for ' redis: ', see if there
>> was a previous error there. Which version of Redis was that?
> I think half an hour after I had enabled redis in amavis,
> it happened for every mail the whole night long :-)
> The version I use is: 2.6.15 (Gentoo 2.6.15-r1)

I haven't much experience with redis 2.6, I'm using 2.8
ever since it got out. Consider switching to 2.8.latest,
just in case. And for starters leave out the maxmemory
setting, observe usage for some time, and only then
set the limit if it feels the right thing to do.

If the problem reoccurs, check the debug log at a time
the problem started, and see what happened shortly before.

>> The $redis_logging_queue_size_limit just puts a cap
>> on a json queue size in case that noone is reading
>> from this queue (e.g. some monitoring/logging process).
>> Otherwise this queue size normally contains just
>> a few entries.
> There does not exist any application that makes use of the
> redis data, yet. Even not planned so far, but...

In that case leave the json logging off, as is a default:
   $redis_logging_key = undef;
   $redis_logging_queue_size_limit = undef;

Either of these two settings will disable logging to json.

Or to start playing with it, set $redis_logging_key to
some string and $redis_logging_queue_size_limit to some
small value, e.g. 100. This way it will only keep the
latest 100 log messages in the log queue, so it won't
take much memory in case a monitoring application is
not running.

See the logstash example in release notes, it is a good
starting point (although I switched to a home-build perl
monitoring process to feed log messages to Elasticsearch,
ditching logstash).


More information about the amavis-users mailing list