Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Dec 1997 00:00:02 -0800 (PST)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs
Subject:   Re: bin/5306: gethostbyname() returns herror "Unknown host" on well known hosts
Message-ID:  <199712160800.AAA04905@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/5306; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: freebsd-gnats-submit@FreeBSD.ORG, robert@superior.net
Cc:  Subject: Re: bin/5306: gethostbyname() returns herror "Unknown host" on well known hosts
Date: Tue, 16 Dec 1997 18:49:02 +1100

 >>Description:
 >When on a well loaded system, gethostbyname() will return "Unknown
 >Host" on well known hosts. (ie: mit.edu, internic.net, etc.)  On a loaded
 >...
 >Not sure if this makes a difference, this kernel has:
 >options         "CHILD_MAX=256"
 >options         "OPEN_MAX=256"
 
 These are bogus, but misconfiguring the soft openfiles limit by abusing
 OPEN_MAX like this makes the problem less obvious.  The default limit
 is 64 in 2.2.5 and "infinite" in -current.
 
 >Load up a BSD system in which a lot of file discriptors are used. 
 >Compile and run something easy such as Squid and see that it's DNS
 >systems fail.  On this system named is running.  This is not that 
 >difficult to reproduce.
 >>Fix:
 >No fix as of 2.2.5-STABLE
 
 At least for the test program in PR 3622, the fix is to configure enough
 fd's using /etc/login.conf.  In 2.2.5, the default openfiles limits for
 class daemon are 1024 (hard) and OPEN_MAX (soft).  These should be set
 as large as necessary (but no larger) for each class of user.
 
 There is also an evil sysctl limit `kern.maxfilesperproc' with the
 default value of 2*NPROC.  This interferes with correct operation of
 login.conf.  If it is too small, then the easiest way to fix it is to
 edit /sys/conf/param.c and build a new kernel.  There is also a good
 sysctl limit `kern.maxfiles' with the default value of 2*NPROC.  This
 is easy to change at runtime using `sysctl -w kern.maxfiles=...'.
 (Changing kern.maxfilesperproc at runtime doesn't work well because
 it can't increase the openfiles limits in the process tree.  It can
 only decrease them.)
 
 Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712160800.AAA04905>