BIND crashing on a regular basis

Jim Reid jim at rfc1035.com
Wed Jan 26 01:26:51 UTC 2000


>>>>> "Nicholas" == Nicholas Berry <nberry at corp.jps.net> writes:

    Nicholas> On nearly a daily basis, my primary name server dies
    Nicholas> (usually due to the one of the two errors listed below)

    Nicholas> Jan 24 22:49:32 ns1 named[8582]: savestr: memget failed (Cannot allocate memory) 
    Nicholas> Jan 25 12:43:22 ns1 named[23471]: savedata: memget

    Nicholas> I do not have any memory limits set (first thing that I
    Nicholas> changed).  I'm running a PIII 550 with 256 megs of PC100
    Nicholas> RAM.  I wouldn't think that memory would be an issue.
    Nicholas> The name server is servicing approximately 12,000 zone
    Nicholas> files and acts as a caching name server. 

Your name server is almost certainly running into the OS default
limits on the amount of VM that a process can use for data. When the
name server's requests for more data space fail - because the OS won't
let it have any more - the name server gives up and dies. This'll
happen even if the box has plenty of free RAM or swap space.

Note too that it's not primarily the number of zones that affect the
name server's memory usage, but the number of resource records in
those zones. Plus those that it caches.

    Nicholas> I am running BSDI 4.1 with BIND 8.2.2p5.

You will need to tell the OS to increase the amount of VM that the
name server can use. Here's how to do that on BSD/OS (and probably the
other 4.4 BSD-based OS's). Update the VM limits for the daemon process
class in /etc/login.conf. IIRC this is set to 32Mb or 64Mb, which is
usually "good enough" for most processes. Also, use sysctl to change
the maximum VM limit for any process: vm.maxdsize is probably too
low too. That limit seems to override whatever limits were defined in
login.conf. Don't believe the output of the limit command because it
tells lies. It'll say that your datasize limit is X even if X is lower
than vm.maxdsize and once the process grows to vm.maxdsize of data
space, it dies. Well, that's at least what happened on my BSD/OS 4.0
box.

There are no prizes for guessing who found this out the hard way... :-)



More information about the bind-users mailing list