You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Nick Bright <ni...@valnet.net> on 2018/07/19 18:14:14 UTC

sa-learn - not able to get a byes lock

Greetings,

I've deployed SA into my environment, and I'm trying to add some 
training data. This is in a site-wide configuration, so it's a site-wide 
bayes file. The server is fairly active (several thousand mailboxes, 
hundreds of messages per second).

When attemting to sa-learn some spam, it runs for a few moments, then gets:

Jul 19 13:12:03.797 [5437] dbg: locker: safe_lock: trying to get lock on 
/var/spamassassin/bayes_db/bayes with 175 retries

It doesn't seem to get anywhere, it's been running for several minutes 
that way.

I suspect that this is simply because my activity level in bayes is 
higher than a flat file may support.

Is this something I should fix on a flat file bayes DB, or should I look 
at going to Bayes-SQL?

-- 
-----------------------------------------------
-  Nick Bright                                -
-  Vice President of Technology               -
-  Valnet -=- We Connect You -=-              -
-  Tel 888-332-1616 x 315 / Fax 620-331-0789  -
-  Web http://www.valnet.net/                 -
-----------------------------------------------
- Are your files safe?                        -
- Valnet Vault - Secure Cloud Backup          -
- More information & 30 day free trial at     -
- http://www.valnet.net/services/valnet-vault -
-----------------------------------------------


Re: sa-learn - not able to get a byes lock

Posted by Nick Bright <ni...@valnet.net>.
On 7/19/2018 1:22 PM, John Hardin wrote:
>
>> Is this something I should fix on a flat file bayes DB, or should I 
>> look at going to Bayes-SQL?
>
> Redis would probably be better.
I'm having some trouble finding any kind of significant documentation 
about this.

Could somebody please point me at some reading?

http://svn.apache.org/repos/asf/spamassassin/trunk/contrib/HOWTO.Bayes-Redis/readme.txt 
has *very* little information.

How does it work? how does one set it up? From what is available, this 
seems highly experimental and not advisable for a production server?

-- 
-----------------------------------------------
-  Nick Bright                                -
-  Vice President of Technology               -
-  Valnet -=- We Connect You -=-              -
-  Tel 888-332-1616 x 315 / Fax 620-331-0789  -
-  Web http://www.valnet.net/                 -
-----------------------------------------------
- Are your files safe?                        -
- Valnet Vault - Secure Cloud Backup          -
- More information & 30 day free trial at     -
- http://www.valnet.net/services/valnet-vault -
-----------------------------------------------


Re: sa-learn - not able to get a byes lock

Posted by John Hardin <jh...@impsec.org>.
On Thu, 19 Jul 2018, Nick Bright wrote:

> On 7/19/2018 1:22 PM, John Hardin wrote:
>> Do you happen to have autolearn enabled? If so, turn it off.
> In general, or just while trying to run sa-learn?

I think there's consensus that you leave it disabled initially, and do 
manual training to a base reliable state. Then if you don't have a pool of 
trustworthy users to provide training messages that you review, you can 
turn on autolearn.

>> Redis would probably be better.
> I'll check it out, thanks.
>> Also, if you don't have autolearn enabled and you're using flat files, you 
>> could learn into an offline database and when done copy the files over to 
>> the live instance (ideally by directory renaming to minimize the window).
>
> Thanks for the tip!

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   If the rock of doom requires a gentle nudge away from Gaia to
   prevent a very bad day for Earthlings, NASA won’t be riding to the
   rescue. These days, NASA does dodgy weather research and outreach
   programs, not stuff in actual space with rockets piloted by
   flinty-eyed men called Buzz.                       -- Daily Bayonet
-----------------------------------------------------------------------
  Tomorrow: the 49th anniversary of Apollo 11 landing on the Moon

Re: sa-learn - not able to get a byes lock

Posted by Nick Bright <ni...@valnet.net>.
On 7/19/2018 1:22 PM, John Hardin wrote:
> Do you happen to have autolearn enabled? If so, turn it off.
In general, or just while trying to run sa-learn?
> Redis would probably be better.
I'll check it out, thanks.
> Also, if you don't have autolearn enabled and you're using flat files, 
> you could learn into an offline database and when done copy the files 
> over to the live instance (ideally by directory renaming to minimize 
> the window).

Thanks for the tip!

-- 
-----------------------------------------------
-  Nick Bright                                -
-  Vice President of Technology               -
-  Valnet -=- We Connect You -=-              -
-  Tel 888-332-1616 x 315 / Fax 620-331-0789  -
-  Web http://www.valnet.net/                 -
-----------------------------------------------
- Are your files safe?                        -
- Valnet Vault - Secure Cloud Backup          -
- More information & 30 day free trial at     -
- http://www.valnet.net/services/valnet-vault -
-----------------------------------------------


Re: sa-learn - not able to get a byes lock

Posted by John Hardin <jh...@impsec.org>.
On Thu, 19 Jul 2018, Nick Bright wrote:

> I've deployed SA into my environment, and I'm trying to add some training 
> data. This is in a site-wide configuration, so it's a site-wide bayes file. 
> The server is fairly active (several thousand mailboxes, hundreds of messages 
> per second).
>
> When attemting to sa-learn some spam, it runs for a few moments, then gets:
>
> Jul 19 13:12:03.797 [5437] dbg: locker: safe_lock: trying to get lock on 
> /var/spamassassin/bayes_db/bayes with 175 retries
>
> It doesn't seem to get anywhere, it's been running for several minutes that 
> way.

Do you happen to have autolearn enabled? If so, turn it off.

> I suspect that this is simply because my activity level in bayes is higher 
> than a flat file may support.
>
> Is this something I should fix on a flat file bayes DB, or should I look at 
> going to Bayes-SQL?

Redis would probably be better.

Also, if you don't have autolearn enabled and you're using flat files, you 
could learn into an offline database and when done copy the files over to 
the live instance (ideally by directory renaming to minimize the window).

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   If the rock of doom requires a gentle nudge away from Gaia to
   prevent a very bad day for Earthlings, NASA won’t be riding to the
   rescue. These days, NASA does dodgy weather research and outreach
   programs, not stuff in actual space with rockets piloted by
   flinty-eyed men called Buzz.                       -- Daily Bayonet
-----------------------------------------------------------------------
  Tomorrow: the 49th anniversary of Apollo 11 landing on the Moon