Mailing List Archive

How to deel with time limit exceeded
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 deel with time limit exceeded [ In reply to ]
On Mon, Nov 05, 2018 at 08:48:47PM +0100, Andreas Thienemann wrote:
>
> 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.

prineg90 = priority -90 = BAYES rules.

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.
Re: How to deal with time limit exceeded [ In reply to ]
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
Re: How to deal with time limit exceeded [ In reply to ]
On Mon, Nov 05, 2018 at 09:11:22PM +0100, Andreas Thienemann wrote:
>
>
> 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?

grep priority /var/lib/spamassassin/3.004002/updates_spamassassin_org/*.cf

:-)

Pretty much all normal rules are priority 0 though.
Re: How to deel with time limit exceeded [ In reply to ]
Another thing that helps - is to lighten the load on your SA by putting
high quality low-FP DNSBLs in front of SA, that are first called by your
MTA, where spams blocked by those aren't even scanned by SA.
--Rob McEwen

On 11/5/2018 2:48 PM, Andreas Thienemann wrote:
>
> 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
>

--
Rob McEwen