[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: daily "Cannot allocate memory"-problem

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-03-20 19:22:47 CET

On Mar 20, 2005, at 7:51 AM, Thomas -lists wrote:

> Hey there,
>
> I searched the list archives but couldn't find this problem described
> so please point me to posts if that was done somewhere already.
>
> For now I already had to "svnadmin recover" my repository for 3 times
> (each day).
>
> It had stopped working with this error:
> "Berkeley DB error while opening 'nodes' table for filesystem
> /home/subversion/repos/db:
> Cannot allocate memory"

I'm getting a bit annoyed that the automatic answer to every BDB
problem is "switch to FSFS". :-)

First of all, upgrade to DB 4.2, it has many fewer problems than DB 4.1.

Second, make sure that you've allocated enough BDB lock objects, have a
big enough log buffer, and a big enough cache. If you were to
'svnadmin create' a BDB repository today using the latest /trunk svn
code, here are the default values you'd see in DB_CONFIG. Make sure
your own DB_CONFIG has at least these values, and after tweaking, run
'svnadmin recover' again to make the changes stick. See if that clears
things up.

### Lock subsystem
#
# Make sure you read the documentation at:
#
# http://www.sleepycat.com/docs/ref/lock/max.html
#
# before tweaking these values.
set_lk_max_locks 2000
set_lk_max_lockers 2000
set_lk_max_objects 2000

### Log file subsystem
#
# Make sure you read the documentation at:
#
# http://www.sleepycat.com/docs/api_c/env_set_lg_bsize.html
# http://www.sleepycat.com/docs/api_c/env_set_lg_max.html
# http://www.sleepycat.com/docs/ref/log/limits.html
#
# Increase the size of the in-memory log buffer from the default
# of 32 Kbytes to 256 Kbytes. Decrease the log file size from
# 10 Mbytes to 1 Mbyte. This will help reduce the amount of disk
# space required for hot backups. The size of the log file must be
# at least four times the size of the in-memory log buffer.
#
# Note: Decreasing the in-memory buffer size below 256 Kbytes
# will hurt commit performance. For details, see this post from
# Daniel Berlin <dan@dberlin.org>:
#
# http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgId=161960
set_lg_bsize 262144
set_lg_max 1048576
#
# If you see "log region out of memory" errors, bump lg_regionmax.
# See http://www.sleepycat.com/docs/ref/log/config.html and
# http://svn.haxx.se/users/archive-2004-10/1001.shtml for more.
set_lg_regionmax 131072
#
# The default cache size in BDB is only 256k. As explained in
# http://svn.haxx.se/dev/archive-2004-12/0369.shtml, this is too
# small for most applications. Bump this number if "db_stat -m"
# shows too many cache misses.
set_cachesize 0 1048576 1

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Mar 20 19:25:18 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.