From owner-freebsd-questions@FreeBSD.ORG Thu May 3 16:29:24 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A23D16A404 for ; Thu, 3 May 2007 16:29:24 +0000 (UTC) (envelope-from xistence@0x58.com) Received: from mailexchange.osnn.net (1e.66.5646.static.theplanet.com [70.86.102.30]) by mx1.freebsd.org (Postfix) with SMTP id B436A13C447 for ; Thu, 3 May 2007 16:29:23 +0000 (UTC) (envelope-from xistence@0x58.com) Received: (qmail 47416 invoked by uid 0); 3 May 2007 15:58:58 -0000 Received: from unknown (HELO ?10.10.10.101?) (xistence@0x58.com@68.193.15.218) by mailexchange.osnn.net with SMTP; 3 May 2007 15:58:58 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: <4639294F.7020409@ibctech.ca> Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-1-184977756; protocol="application/pkcs7-signature" Message-Id: From: Bert JW Regeer Date: Thu, 3 May 2007 12:02:36 -0400 To: hackers@freebsd.org, questions@freebsd.org X-Mailer: Apple Mail (2.752.3) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Apache2 Virtual Hosts and FreeBSD fd limits. 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: Thu, 03 May 2007 16:29:24 -0000 --Apple-Mail-1-184977756 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On May 3, 2007, at 9:30 AM, Eduardo Meyer wrote: >> # uname -a > > 5.5-STABLE FreeBSD 5.5-STABLE #6: Wed May 2 20:19:43 BRT 2007 > >> # apachectl -v > > Server version: Apache/2.0.59 > Server built: May 2 2007 18:38:18 > >> >> > I have raised maxfiles, but my openfiles do increase and the >> problem >> > with Apache persists. >> >> Does it only affect Apache? > > Certainly not. But my concert is Apache, and this is the only > application this server runs. > > I have also compiled EXTRA_FLAGS=-DFD_SETSIZE=8192 (currently, it was > 2048) and the results were just the same. > >> >> Steve >> > > > -- > =========== > Eduardo Meyer > pessoal: dudu.meyer@gmail.com > profissional: ddm.farmaciap@saude.gov.br Since this is my first post to the mailling list, top post or bottom post which one is preferred? If you have a problems with open file descriptors beccause of VirtualHosts it is my guess that you are logging separately for each vhost (both access, and error). The way I found to solve this was to put it all in one file that is then split up into the separate files using a perl script. It is called split-logfile and can be found online, I believe it was in the Apache source tree. All you need to change is instead of having seperate log files for each of them, you have one log file (which outputs the information using the vhost name as the first item on the line so that the perl script can sort it through that), thus only one FD is used to log. LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User- Agent}i\"" cvh CustomLog /usr/local/logs/everything.log cvh So you can scale out to 5000 vhosts and not run into any limit problems. For errors the splitting up is a bit more tricky, but you should be able to get it done as well. Good luck, Bert JW Regeer --Apple-Mail-1-184977756--