Subject: Re: Bind - too many open files
To: Rick Byers <rickb@iaw.on.ca>
From: Mark Andrews <Mark.Andrews@dms.csiro.au>
List: netbsd-help
Date: 12/16/1996 09:55:43
> 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/
> 
> 
> 
> 

	Modern BINDs automatically set the number of files available to
	FD_SETSIZE. This is as large as you can go safely without
	recompiling. If you want to go larger than the system default
	for FD_SETSIZE you need to recompile with FD_SETSIZE set to a
	higher value so that the fd_set's get allocated correctly.

	Mark
--
Mark Andrews, CSIRO Mathematical and Information Sciences
Locked Bag 17, North Ryde, NSW 2113, Australia.
PHONE: +61 2 9325 3148                 INTERNET: Mark.Andrews@cmis.csiro.au
MOBIL: +61 41 442 9884           UUCP:....!uunet!cmis.csiro.au!mark.andrews