I saw the same error few month ago. I changed the locking mechanism using:

use DB_File::Lock;
use Fcntl qw(:flock O_RDWR O_CREAT);

and opening the DB with the command:

$db = tie %GDB, 'DB_File::Lock', $DBFilename, O_CREAT|O_RDWR, undef, $DB_HASH, 'write';

Andrea


At 20.21 27/04/2004, you wrote:


All,

I turned on greylisting last night, based on the code posted by Steve
Rocha (which was based on Jonas's code i think).  Things were fine until
the db reached about 3300 records.  Then it would not accept any new keys,
the inserts just silently fail.  I turned off greylisting and verified
this... it appears the db is corrupt.

Could this be caused by a locking issue?  Right now the lock_db function
is just using flock before tie'ing the hash:

       lock_db();
        if (tie(%GDB,'DB_File', $DBFilename)) {


Is this safe? It is a moderately busy mail server, around 150k messages a day. Is this too much for a dbm file? I'd imagine i'd have 10's of thousands of triplets in the db. Should i look at implementing it in mysql or postgres?

And just for my curiousity, is there a way to repair a corrupt dbm file?

ray

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


---------------------------------------
Virus checking initiated... Completed. All viruses functioning normally.
---------------------------------------
Ing. Andrea Gabellini
Email: [EMAIL PROTECTED]
Tel: 0549 886111 (Italy)
Tel. +378 0549 886111 (International)

Intelcom San Marino S.p.A.
Strada degli Angariari, 3
47891 Rovereta
Repubblic of San Marino

http://www.omniway.sm http://www.intelcom.sm

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to