redis problems

Mark Martinec Mark.Martinec+amavis at
Sat Jul 5 13:52:42 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?

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?

>> Jul  5 10:59:57 mx amavis[26363]: (26363-02) (!)save_structured_report failed:
> OOM command not allowed when used memory > 'maxmemory‘.
>> # takes about 250 MB of redis memory per 100000 log entries
>> $redis_logging_queue_size_limit = 300000;
> I modified redis, to have "maxmemory 536870912".
> Yet I don’t know how to calculate this value.
> Hopefully this warning disappears.

   $ redis-cli info
It will provide information on the current memory usage.
Use this to estimate a suitable limit, if you choose
to set maxmemory.

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.

Besides the json log queue, the redis memory is
used also for pen-pals data and for IP reputation.
These use automatic expiration (configurable),
and the size needed for these depends very much
on your mail traffic and its diversity.

Moreover, if redis-based Bayes database backend
is configured in SpamAssassin, this needs to be
taken into account as well. See man page
for Mail::SpamAssassin::BayesStore::Redis


More information about the amavis-users mailing list