How to deel with time limit exceeded

2018-11-05 Thread Andreas Thienemann



Hi,

I've got a mailserver dealing with a moderate amount of mails... Say about 
20k mails a day.


The setup has a spamassassin 3.4.2 with a mysql database for bayes and to 
do a minimum of logging.


I've recently seen a lot of mail scans not completing due to running out 
of time. The message I am seeing most often is "check: exceeded time limit 
in Mail::SpamAssassin::Plugin::Check::_eval_tests_type11_prineg90_set3, 
skipping further tests". This is happening for abour 5% of incoming mail.


I am trying to understand what exactly is going on here?
It seems that this is happening since I moved bayes to a local mysql 
database to resolve locking problems I saw in the logs with the on-disk 
files. I previously had configured spamd to run with --timeout-child=30 
which now seems too small.


Having looked at the code of SA I understand that this string is built 
using the following variables:

$package_name."::_".$ruletype."_tests_".$clean_priority;

But that does not really help me understand _what_ is taking that long and 
how I can improve the spamassassin runtime.


Any ideas?

thanks,
 Andreas


Re: How to deal with time limit exceeded

2018-11-05 Thread Andreas Thienemann




On Mon, 5 Nov 2018, Henrik K wrote:


prineg90 = priority -90 = BAYES rules.


Right. Thanks for that.
Is there a good mapping table one can consult?



So your MySQL is too slow / bad settings / not using InnoDB etc.  If you
want easy solution, switch database to Redis and never worry about Bayes
anymore.


Thanks for the suggestion. I might give it a shot.
After your pointer I had another look at the mysql config: Turns out the 
innodb buffer cache was 1024 bytes.
A variable multiplier was removed and configuration management happily 
rolled out a _way_ too small buffer...


That would explain terrible mysql performance. Thanks for the pointer, 
will see if my issues will go away...


cheers,
 Andreas