[spambayes-dev] Re: [Spambayes] Error from pop3proxy

Barry Warsaw barry at python.org
Thu Oct 2 07:41:38 EDT 2003

On Thu, 2003-10-02 at 02:48, Meyer, Tony wrote:

> I don't suppose you're low on memory or disk space, are you Richie?  In
> any case, the sleepycat docs all seem to say that running recovery will
> fix the db without any worries, so perhaps that is simply what we should
> do?

FWIW, in the BerkeleyDB storage in ZODB, we do the following three
things related to recovery:

- Open the environment with db.DB_RECOVER so that recovery is run
automatically if necessary.  If it's not necessary (i.e. the db was
closed cleanly), this should take no time.

- Spawn a checkpointing thread.  Recovery time is related to the amount
of time since the last checkpoint.  If you never checkpoint, the
recovery (auto or explicit) can take a very long time.  By default, the
BerkeleyDB storage checkpoints every two minutes.

- On shutdown, do two forced checkpoints.  That is:

  env.txn_checkpoint(0, 0, db.DB_FORCE)
  env.txn_checkpoint(0, 0, db.DB_FORCE)

  This deep voodoo was recommended to me by Keith Bostic ages ago and
its purpose is to avoid lengthy recoveries even when the database is
shutdown cleanly.  Apparently the DB_FORCE is required for the second
call, but does no harm for the first.  And yep, you need two of them.

wishing-you-a-speedy-recovery-ly y'rs,

More information about the spambayes-dev mailing list