> From: Marc Perkel [mailto:supp...@junkemailfilter.com] > > I'm wondering if bayes is slow and causing SA to time out and not run > other tests? Or does bayes run in parallel? I'm beginning to wonder if > bayes is killing other tests allowing more spam to get through?
I'm not an expert of SQL-based bayes, but isn't that the problem is in the outstanding transactions? SA not only reads tokens from bayes: it also inserts them and (even worse) updates their ham/spam occurrence counters. In that case, if the various SA copies running in parallel access the bayes db via a transaction of the "wrong type" (read-committable upward, I guess), if one of the copies of SA attempts updating a the counters of a "common" token (like "regards", or "and" and so on) it is possible that SA process gets hung until the one "holding that token" commits. If the transaction starts early and lasts lately during the message checking activity, it may be that a single SA process could hold all others from completing. I see that Mail::SpamAssassin::BayesStore::MySQL:nspam_nham_change, put_token and put_tokens all invoke a commit(), but when that transaction was begun? At tok_get_all? It that is the case, concurrent access of the bayes db may be improbable. Giampaolo