List Info

Thread: Error related to /var/amavisd/db




Error related to /var/amavisd/db
user name
2007-01-30 13:11:12
I just had this error happen on one of my systems.  I know
it's related 
to the following two lines in amavisd.conf. 

$enable_db = 1;              # enable use of
BerkeleyDB/libdb (SNMP and 
nanny)
$enable_global_cache = 1;    # enable use of libdb-based
cache if 
$enable_db=1

After doing some searching, I found out that this db holds
information 
about recently processed mail to speed up identical email
sent to 
recipients on this system.

My questions are:

1)  What would cause this error in the first place?
2)  How do you prevent this?
3)  How much of a benefit does this actually provide?

Jan 30 10:57:30 skinny amavis[7546]: (07546-06) TROUBLE in
check_mail: 
spam_scan FAILED: BDB Q db_cursor: PANIC: fatal region error
detected; 
run recovery, . at (eval 51) line 59.
Jan 30 10:57:30 skinny amavis[7784]: (07546-06) TROUBLE in 
process_request: register_proc: BDB N db_cursor: PANIC:
fatal region 
error detected; run recovery, Resource temporarily
unavailable. at (eval 
50) line 161.
Jan 30 10:57:30 skinny amavis[7546]: (07546-06) TROUBLE in 
process_request: register_proc: BDB N db_cursor: PANIC:
fatal region 
error detected; run recovery, Resource temporarily
unavailable. at (eval 
50) line 161.
Jan 30 10:57:30 skinny amavis[7813]: TROUBLE in
child_init_hook: BDB bad 
db env. at /var/amavisd/db: DB_RUNRECOVERY: Fatal error, run
database 
recovery, No such file or directory. at (eval 50) line 258.

Thanks,

Darrick

-- 
Darrick Hartman
DJH Solutions, LLC
http://www.djhsolutions.c
om

_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: Error related to /var/amavisd/db
user name
2007-01-30 17:10:38
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Darrick Hartman wrote:
> I just had this error happen on one of my systems.  I
know it's related 
> to the following two lines in amavisd.conf. 
> 
> $enable_db = 1;              # enable use of
BerkeleyDB/libdb (SNMP and 
> nanny)
> $enable_global_cache = 1;    # enable use of
libdb-based cache if 
> $enable_db=1
> 
> After doing some searching, I found out that this db
holds information 
> about recently processed mail to speed up identical
email sent to 
> recipients on this system.
> 
> My questions are:
> 
> 1)  What would cause this error in the first place?

(1) It's a BerkeleyDB database.  They're notoriously
susceptible to
corruption, particularly in multi-writer environments, which
is why they
shouldn't be trusted with any "vital" information.
 In this case it's
only being used as a disposable runtime cache, so the risk
is tolerable.

> 2)  How do you prevent this?

(2) You can't, really--unless you're running in a
single-user,
single-process environment.  You can ensure you're running
the latest
version of the BerkeleyDB module, but sooner or later
BerkeleyDB
corruption strikes everyone.  Instead, just get used to the
idea that
you'll occasionally have to delete the contents of the
"db" subdirectory
and restart amavisd-maia to correct this problem.

> 3)  How much of a benefit does this actually provide?

(3) In most cases it doesn't offer much of a benefit, since
most mail
items won't share Message-IDs.  On the other hand if you run
some large
mailing lists (such that the postings get broken up into
many separate
50-recipient groups before being submitted to the upstream
MTA) it can
make a dramatic difference by only having to scan /one/ of
these
batches.  A list with 500 subscribers, for instance, would
typically
submit the same mail item 10 times (with 50 envelope
recipients) for
scanning, but with this caching enabled it only has to do so
once.

- --
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFv9BtGmqOER2NHewRAge3AJ9fo51swom7DnA58q84XFWIGS0zlwCg
lPPt
A+MY+lcUdTzeMB9wPgsEYvE=
=pY/t
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: Error related to /var/amavisd/db
user name
2007-01-30 17:19:41
Robert LeBlanc wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Darrick Hartman wrote:
>   
>> I just had this error happen on one of my systems. 
I know it's related 
>> to the following two lines in amavisd.conf. 
>>
>> $enable_db = 1;              # enable use of
BerkeleyDB/libdb (SNMP and 
>> nanny)
>> $enable_global_cache = 1;    # enable use of
libdb-based cache if 
>> $enable_db=1
>>
>> After doing some searching, I found out that this
db holds information 
>> about recently processed mail to speed up identical
email sent to 
>> recipients on this system.
>>
>> My questions are:
>>
>> 1)  What would cause this error in the first
place?
>>     
>
> (1) It's a BerkeleyDB database.  They're notoriously
susceptible to
> corruption, particularly in multi-writer environments,
which is why they
> shouldn't be trusted with any "vital"
information.  In this case it's
> only being used as a disposable runtime cache, so the
risk is tolerable.
>   
Hmmm.  That's what I guessed.  It's not tolerable for mail
delivery to 
be interrupted because this dumb database is corrupt. 
Luckily this time 
it happened when I was in the office and noticed that I
hadn't received 
a message in 30 minutes.  I deleted the db then restarted
amavisd and 
all was happy (after I requeued the approx 200 messages). 
If this would 
have happened on a Friday afternoon as I was on my way out
of town and I 
found out about it from a client, that would have been a
problem (even 
though no messages would have been lost).
>> 3)  How much of a benefit does this actually
provide?
>>     
>
> (3) In most cases it doesn't offer much of a benefit,
since most mail
> items won't share Message-IDs.  On the other hand if
you run some large
> mailing lists (such that the postings get broken up
into many separate
> 50-recipient groups before being submitted to the
upstream MTA) it can
> make a dramatic difference by only having to scan /one/
of these
> batches.  A list with 500 subscribers, for instance,
would typically
> submit the same mail item 10 times (with 50 envelope
recipients) for
> scanning, but with this caching enabled it only has to
do so once.
>   
Thanks for the answer.  In my case, I'm going to disable it.
 The risks 
definitely don't outweigh the advantages.

Darrick

-- 
Darrick Hartman
DJH Solutions, LLC
http://www.djhsolutions.c
om

_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )