[Spambayes] SpamBayes proxy database corruption

Ian Hlavats ihlavats at tarantulaconsulting.com
Tue Aug 3 03:14:40 CEST 2004


Hi Tony,

Thanks for your help. I'm still not able to use MySQL with the SpamBayes
proxy version 1.0rc1. I got the following error when I changed the storage
option to MySQL using the web interface:

500 Server error
Traceback (most recent call last):
  File "spambayes\Dibbler.pyc", line 461, in found_terminator
  File "spambayes\UserInterface.pyc", line 793, in onChangeopts
  File "spambayes\ProxyUI.pyc", line 724, in reReadOptions
  File "sb_server.pyc", line 861, in _recreateState
  File "sb_server.pyc", line 876, in prepare
  File "sb_server.pyc", line 708, in prepare
  File "sb_server.pyc", line 756, in createWorkers
  File "spambayes\storage.pyc", line 681, in open_storage
  File "spambayes\storage.pyc", line 511, in __init__
  File "spambayes\storage.pyc", line 317, in __init__
  File "spambayes\storage.pyc", line 525, in load
ImportError: No module named MySQLdb

I have Python 2.3 installed with MySQLdb 1.0 (I extracted it in
Python23\Lib\site-packages as per instructions). What could be the problem?
Also, will the SpamBayes proxy create the database schema or do I have to do
this beforehand?

About the recurring corrupted dbm problem, I'm also running Norton
AntiVirus. Maybe it's causing the problem when it checks for infected
messages?

Ian


-----Original Message-----
From: Tony Meyer [mailto:tameyer at ihug.co.nz]
Sent: Monday 2 August 2004 7:40 PM
To: ihlavats at tarantulaconsulting.com; spambayes at python.org
Subject: RE: [Spambayes] SpamBayes proxy database corruption


> It seems that about once a month the database
> gets corrupted. I get the following mail header in my
> messages when this happens:
[DBRUN_RECOVERY error]

> I am using dbm storage option (I wish there was a
> SpamBayes-MySQL-HowTo out there!)

I think this will work (but it's a long time since I've done it):

 1.  Create a database for use with spambayes.
 2.  In your configuration file, change the "persistent_storage_file" option
to:
     user:username pass:password host:host dbname:database_name
     (but filling in the appropriate values.  Host defaults to "localhost",
and dbname defaults to "spambayes".  User defaults to "root" and password
defaults to "".
 3.  In your configuration file, change the "persistent_use_database" option
(or add it, if it's not there) to:
     mysql

Let us know if you run into troubles if you try this - we should probably be
able to figure them out.

> and I don't know how to run database recovery.

You can't.  The error message comes from the underlying bsddb system, but we
don't use it in such a way that the recovery tool would do any good.

You could also change to using a pickle (change the first option to some
filename like "hamme.pik" and the second to "pickle").

Can you think of anything unusual about your setup that might be causing
this?  We still get the occasional instance of this problem, but we don't
know what's left that might cause it.  (Other than multiple processes trying
to access the database at the same time, and interrupting SpamBayes while it
is training).

=Tony Meyer

---
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes. This
way, you get everyone's help, and avoid a lack of replies when I'm busy.





More information about the Spambayes mailing list