sks-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sks-devel] Bdb.DBError("BDB2034 unable to allocate memory for mutex


From: John Clizbe
Subject: Re: [Sks-devel] Bdb.DBError("BDB2034 unable to allocate memory for mutex; resize mutex region")
Date: Wed, 26 Jun 2013 19:04:29 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:20.0) Gecko/20100101 Firefox/20.0 SeaMonkey/2.17.1

Frank de Bot wrote:
> Hello,
> 
> Often my SKS servers stops working. In the log I see this last line:
> Bdb.DBError("BDB2034 unable to allocate memory for mutex; resize mutex
> region")
> 
> I run a FreeBSD 8.1 (x64) server with these versions:
> 
> SKS version 1.1.4
> Compiled with Ocaml version 3.12.1 and BDB version 5.3.21
> 
> Pagesizes in my sksconf are:
> 
> pagesize: 128
> ptree_pagesize: 16
> 
> How can I prevent this error?

Hello Frank,

It sounds like you need to setup some tuning parameters for BDB. This is done
with a file named DB_CONFIG in the same directory as the database files, KDB
and PTree. Mine contains the lines

    set_mp_mmapsize     268435456
    set_cachesize       0       134217728 1
    set_flags           DB_LOG_AUTOREMOVE
    set_lg_regionmax    1048576
    set_lg_max          104857600
    set_lg_bsize        2097152
    set_tmp_dir         /tmp
    set_lock_timeout    1000
    set_txn_timeout     1000
    set_lk_max_locks    16384
    set_lk_max_lockers  16384
    set_lk_max_objects  16384
    set_lk_detect       DB_LOCK_DEFAULT
    mutex_set_max       163480

Once the file is in place, there is a small bit of maintenance to do.

1) shutdown SKS daemons
2) cd to the directory contain the database directories, e.g., /var/sks, 
/var/lib
3) remove the old environment and checkpoint the DBs:

   db_recover -h KDB
   db_recover -h PTree
   db_checkpoint -1h KDB
   db_checkpoint -1h Ptree

the db_ utilities may have versioned names, for BDB 5.3 these could begin with
db53_ or db5.3_

SKS will create new environments for each DB when it starts again or you may
do it yourself in advance by passing the -e option to db_recover:

   db_recover -eh KDB
   db_recover -eh PTree

HTH,

-John

-- 
John P. Clizbe                      Inet: John (a) Gingerbear DAWT net
SKS/Enigmail/PGP-EKP                  or: John ( @ ) Enigmail DAWT net
FSF Assoc #995 / FSFE Fellow #1797  hkp://keyserver.gingerbear.net  or
     mailto:address@hidden

Q:"Just how do the residents of Haiku, Hawai'i hold conversations?"
A:"An odd melody / island voices on the winds / surplus of vowels"


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]