Date: Sat, 16 Aug 2008 01:41:14 -0400 From: "Tamouh Hakmi" <hakmi@rogers.com> To: "'FreeBSD Questions'" <freebsd-questions@freebsd.org> Subject: RE: getaddrinfo() failed in Apache 2.2 Message-ID: <037d01c8ff62$b2f70470$6900a8c0@tamouh> In-Reply-To: <037401c8fd8c$3dca8370$6900a8c0@tamouh> References: <037401c8fd8c$3dca8370$6900a8c0@tamouh>
next in thread | previous in thread | raw e-mail | index | archive | help
=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 <? include(http://www.google.com); ?>=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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?037d01c8ff62$b2f70470$6900a8c0>