Forums.ATC.no

Teknisk => Generelt teknisk => Emne startet av: Floyd-ATC på 02. Desember 2014, 16:17 pm

Tittel: SpamAssassin: Issuing rollback() due to DESTROY without explicit disconnect()
Skrevet av: Floyd-ATC02. Desember 2014, 16:17 pm
SpamAssassin logs the following message in /var/log/messages

Kode: [Velg]
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle bayes:localhost at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/Bayes.pm line 1516
This is because SpamAssassin for some reason explicitly sets AutoCommit to 0 and doesn't properly disconnect() its database handle before it goes out of scope. This problem was first reported in 2010(!) and instead of resulting in a patch, the discussion degenerated into bashing the Perl language.

Note that if you are using MyISAM tables in MySQL, rollbacks are not actually possible. If, however, you are using a table format which supports transaction (such as "innodb"), then this bug is effectively preventing your Bayes database from learning.

The quick fix is to enable AutoCommit, hopefully the SpamAssassin team will come up with a more proper fix before the sun collapses.

Edit the file "/usr/share/perl5/vendor_perl/Mail/SpamAssassin/BayesStore/MySQL.pm"
Change
Kode: [Velg]
'AutoCommit' => 0to
Kode: [Velg]
'AutoCommit' => 1
Save the file and restart the spamassassin service.