Subject: Bind - too many open files
To: None <netbsd-help@NetBSD.ORG, bind-users@vix.com>
From: Rick Byers <rickb@iaw.on.ca>
List: netbsd-help
Date: 12/08/1996 18:21:02
Hi...

I've got NetBSD 1.2, and I've been having some trouble with bind, so I
upgraded it to V4.9.5, but I still have the same problem.  Our machine has
about 256 IP addresses associated with it's only ethernet interface
(virtual-host for web-sites), and named allways generates the folling
errors when I try to restart it:  fcntl(dfd, F_DUPFD, 20): Too many open
files socket(SOCK_DGRAM): Too many open files - exiting. 

The only way I can succesfully restart named is to reboot the system.  I
used to be able to increase the limit of open files, but that has stopped
working as well.  (ulimit -n 128 used to do the trick, now even ulimit -n
2048 gives the same error).  

I think the problem occurs in ns_main.c where it "Opens datagram sockets
bound to interface addresses".  Does it really need to open a datagram
socket for each ip address, even though they are all aliases for the same
interface?  Is there any safe way to override that procedure, or let it do
a few at a time instead all at once?  Under normal operating circumstances
it only has 3 UDP, 1 TCP and 1 UNIX socket open.

Is there any way around my problem other than reducing the number of
IP addresses associated with the interface?  If thats the only solution,
let me know and I'll look into the possibility of splitting the load to
another machine - but I'd really rather not.

Thanks a-lot,
	Rick

=========================================================================
Rick Byers                                      Internet Access Worldwide
rickb@iaw.on.ca                                System Admin, Tech Support
Welland, Ontario, Canada                                    (905)714-1400
http://www.iaw.on.ca/rickb/                         http://www.iaw.on.ca/