From owner-freebsd-questions@FreeBSD.ORG Sat Aug 16 05:41:14 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F17A71065677 for ; Sat, 16 Aug 2008 05:41:14 +0000 (UTC) (envelope-from hakmi@rogers.com) Received: from smtp104.rog.mail.re2.yahoo.com (smtp104.rog.mail.re2.yahoo.com [206.190.36.82]) by mx1.freebsd.org (Postfix) with SMTP id 994EC8FC08 for ; Sat, 16 Aug 2008 05:41:14 +0000 (UTC) (envelope-from hakmi@rogers.com) Received: (qmail 77365 invoked from network); 16 Aug 2008 05:41:13 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:References:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:In-reply-to:X-MimeOLE:Thread-Index; b=OerjNy2jj63I8xkPY9TbATGJ0a9Ep0I8H3QDQy5lD8GdTu/G2ApjByWr0H4HVU+KR4Em8jhgHJJRvhIqHZ9NsOoIkzjCNfaRSoKZB+QzhKCUCo6Pk9hCuwp9+kULvsSUQQDNQ6id0RKsQ54gceS9aoYVK/5hdylDN8t9MYxh63g= ; Received: from unknown (HELO tamouh) (hakmi@rogers.com@99.224.76.214 with login) by smtp104.rog.mail.re2.yahoo.com with SMTP; 16 Aug 2008 05:41:13 -0000 X-YMail-OSG: pYFz2YoVM1mXpTCmWQ8XXZC3F3sGH5utdh1eoCp6Z_Ly7LMIJxhGgNEfyYrQgLkHXw-- X-Yahoo-Newman-Property: ymail-3 From: "Tamouh Hakmi" To: "'FreeBSD Questions'" References: <037401c8fd8c$3dca8370$6900a8c0@tamouh> Date: Sat, 16 Aug 2008 01:41:14 -0400 Message-ID: <037d01c8ff62$b2f70470$6900a8c0@tamouh> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 In-reply-to: <037401c8fd8c$3dca8370$6900a8c0@tamouh> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Thread-Index: Acj9jD2NsgLShmAORiaw8Rs+A9VTLgB1i3yQ Subject: RE: getaddrinfo() failed in Apache 2.2 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2008 05:41:15 -0000 =20 >=20 >=20 > Hi, >=20 > I'm working on a problem with Apache 2.2 + PHP on FreeBSD 6.1 x86 >=20 > Recently, we've upgraded from Apache 1.3 to v2.2 , and since=20 > then PHP is unable to resolve hostnames unless they're=20 > specified in /etc/hosts . The error we'd get would be: >=20 > php_network_getaddresses: getaddrinfo failed: hostname nor=20 > servname provided, or not known in=20 > /home/username/public_html/testphp.php on line 2 >=20 > This is for a simple =20 > function. We know it is not a DNS problem, because if PHP is=20 > setup as a CGI function, it works fine. It is only in DSO=20 > mode that PHP malfunction like this. We're also having no=20 > issues with our resolver for mail, ping or any other services. >=20 > Some people were pointing out that this is a fault of FreeBSD=20 > reaching a maximum number of file descriptors. Others said=20 > this can't be resolved until upgraded to FBSD 6.3 which we=20 > are not planning to go through. There are several hundred=20 > domains hosted on the server, but all was working fine with=20 > Apache 1.3. >=20 > Our VNODES are a bit high, but haven't seen any errors: >=20 > server# sysctl kern.maxvnodes > kern.maxvnodes: 100000 > server# sysctl vfs.numvnodes > vfs.numvnodes: 84805 >=20 > server# sysctl kern.maxfiles > kern.maxfiles: 65536 > kern.maxfilesperproc: 32767 >=20 > Anyone be able to guide me in the right direction here? >=20 > Thanks,=20 >=20 > Tamouh >=20 >=20 We seem to have found the source of the issue. It looks like too many = opened files by Apache 2.2 is causing this problem. Once we disable for example CustomLog, everything works fine. Is there a way around this on FreeBSD ? Thanks, Tamouh