Subject: Re: Bind 4.9.4PL1 - 'Too many open files'
To: None <>
From: Mike Long <>
List: netbsd-users
Date: 02/06/1997 13:10:36
>Date: Thu, 6 Feb 1997 15:05:26 +0000
>From: (Jon Ribbens)

>Today Bind has started to go strange on us. We're running Bind 4.9.4PL1
>under NetBSD 1.1. When we 'kill -HUP' the named, it fails to reload the
>primary zones, saying 'Too many open files'. It also seems to be doing
>this sometimes for zone transfers. Does anybody have any idea why it
>does this (it surely can't be *really* running out of files, it only
>needs about 4 sockets and, err, no files)? Killing the named completely
>and restarting it doesn't help, rebooting the machine does.

fstat(8) may be able to tell you which process(es) are hogging file

>While we're on the subject of open files, how is the per-process
>maximum specified? I think the relevant value is '_SC_OPEN_MAX'
>(man sysconf says this is maximum number of open files per
>*user id*, this isn't right is it?)

The values returned by getrlimit(RLIMIT_NOFILE, ...) are the current
soft and hard limits for the process.  sysconf(_SC_OPEN_MAX) is the
maximum per-process limit.
Mike Long <>     <URL:>
VLSI Design Engineer         finger for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil