From owner-freebsd-net@FreeBSD.ORG Wed Dec 10 07:58:41 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 990F3106564A for ; Wed, 10 Dec 2008 07:58:41 +0000 (UTC) (envelope-from ddesimone@verio.net) Received: from relay1-bcrtfl2.verio.net (relay1-bcrtfl2.verio.net [131.103.218.142]) by mx1.freebsd.org (Postfix) with ESMTP id 3412E8FC0C for ; Wed, 10 Dec 2008 07:58:40 +0000 (UTC) (envelope-from ddesimone@verio.net) Received: from iad-wprd-xchw01.corp.verio.net (iad-wprd-xchw01.corp.verio.net [198.87.7.164]) by relay1-bcrtfl2.verio.net (Postfix) with ESMTP id C736FB0380C2 for ; Wed, 10 Dec 2008 02:58:39 -0500 (EST) Thread-Index: AclanRylrvC/+HYfR6+3LR41qsXklA== Received: from limbo.int.dllstx01.us.it.verio.net ([10.10.10.11]) by iad-wprd-xchw01.corp.verio.net with Microsoft SMTPSVC(6.0.3790.1830); Wed, 10 Dec 2008 02:58:39 -0500 Received: by limbo.int.dllstx01.us.it.verio.net (Postfix, from userid 1000) id EF33E8E295; Wed, 10 Dec 2008 01:58:38 -0600 (CST) Date: Wed, 10 Dec 2008 01:58:38 -0600 Content-Transfer-Encoding: 7bit From: "David DeSimone" To: Content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168 Importance: normal Priority: normal Message-ID: <20081210075838.GB12948@verio.net> Mail-Followup-To: freebsd-net@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: Precedence: bulk User-Agent: Mutt/1.5.9i X-OriginalArrivalTime: 10 Dec 2008 07:58:39.0296 (UTC) FILETIME=[1C998C00:01C95A9D] Subject: Re: [help]strange problem about gethostbyname/getaddrinfo X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 07:58:41 -0000 wrote: > > The problem is we found when the server porcess open 1000+ or higher > sockets(but we can query any legal domain in the system normally), the > gethostbyname or getaddrinfo might fetch nothing(sometimes the query > is ok), the gethostbyname's return error is: errno=2,strerror=Host > name lookup failure It sounds like the resolver library is running into a 1024-descriptor limit. From select(2): NOTES The default size of FD_SETSIZE is currently 1024. In order to accommo- date programs which might potentially use a larger number of open files with select(), it is possible to increase this size by having the program define FD_SETSIZE before the inclusion of any header which includes . Unfortunately you might have to rebuild the resolver library itself in order for it to be able to query file descriptors larger than 1024. -- David DeSimone == Network Admin == fox@verio.net "I don't like spinach, and I'm glad I don't, because if I liked it I'd eat it, and I just hate it." -- Clarence Darrow This email message is intended for the use of the person to whom it has been sent, and may contain information that is confidential or legally protected. If you are not the intended recipient or have received this message in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments. Verio, Inc. makes no warranty that this email is error or virus free. Thank you.