From owner-freebsd-isp@FreeBSD.ORG Thu Apr 28 17:09:10 2005 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3D2316A4CE for ; Thu, 28 Apr 2005 17:09:10 +0000 (GMT) Received: from mailspool.ops.uunet.co.za (mailspool.ops.uunet.co.za [196.7.0.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9059B43D31 for ; Thu, 28 Apr 2005 17:09:09 +0000 (GMT) (envelope-from mark@aboutit.co.za) Received: from 196-47-4-10.access.uunet.co.za ([196.47.4.10] helo=hermes.aboutit.co.za) by mailspool.ops.uunet.co.za with esmtp (Exim 3.36 #1) id 1DRCVg-000Imn-00; Thu, 28 Apr 2005 19:09:08 +0200 Received: by hermes.aboutit.co.za (Postfix, from userid 65534) id 0FE2BD63DA; Thu, 28 Apr 2005 19:09:03 +0200 (SAST) Received: from localhost (localhost [127.0.0.1]) by hermes.aboutit.co.za (Postfix) with ESMTP id 0F716D63E7; Thu, 28 Apr 2005 19:09:01 +0200 (SAST) Received: from hermes.aboutit.co.za (localhost [127.0.0.1]) by hermes.aboutit.co.za (Postfix) with ESMTP id AC5C6D63CF; Thu, 28 Apr 2005 19:09:00 +0200 (SAST) Message-ID: <2165595.1114708140701.SLOX.WebMail.wwwrun@hermes.aboutit.co.za> From: Mark Bojara To: Andrew McNaughton Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Priority: 3 (normal) X-Mailer: SuSE Linux Openexchange Server 4 - WebMail (Build 2.3780) X-Operating-System: Linux 2.4.19-4GB i386 (JVM 1.3.1_04) Organization: AboutIT Online References: <212682.1114679709203.SLOX.WebMail.wwwrun@hermes.aboutit.co.za><20050428212753.W66240@a2.scoop.co.nz> Date: Thu, 28 Apr 2005 19:09:00 +0200 (SAST) X-Virus-Scanned: by AMaViS snapshot-20020531 X-Spam-Status: No, hits=-4.7 required=8.0 tests=AWL,BAYES_01,EMAIL_ATTRIBUTION,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-isp@freebsd.org Subject: Re: apache in worker mode eats memory X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2005 17:09:10 -0000 what options would you advise i tweak? On Apr 28, 2005 11:35 AM, Andrew McNaughton wrote: > > If apache is allowed to spawn enough processes to run you out of memory, > you are going to have problems. Work on your apache config and process > limits to make sure this can't happen. > > If you consume enough memory to start paging, the time it takes for a > request to be handled climbs, more processes mount up, you consume more > memory, and the system goes down badly. Limiting how much you try to > handle at once enables you to handle more. > > If your server processes have a large memory footprint, using a proxy in > front of your web server to handle spooling requests to users might help a > lot. Caching is not necessarily part of that picture, but that might also > help save you from using large apache processes to serve simple requests. > > Andrew McNaughton > > > > On Thu, 28 Apr 2005, Mark Bojara wrote: > > > Date: Thu, 28 Apr 2005 11:15:09 +0200 (SAST) > > From: Mark Bojara > > To: freebsd-isp@freebsd.org > > Subject: apache in worker mode eats memory > > > > Hi All > > > > Im running Apache 2.0.53 server on 5.4-RC3 AMD64 in Worker mode. This > > webserver serves 50000 hits per hour. Whats currently happening is it > > works fine for 8 hours then the server just starts spawning httpd > > processes when it reaches about 70 processes the box runs out of memory > > and swap space then crashes :( > > > > This is what I currently have set: > > ServerLimit 16 > > StartServers 2 > > MaxClients 150 > > MinSpareThreads 25 > > MaxSpareThreads 75 > > ThreadsPerChild 25 > > MaxRequestsPerChild 20000 > > EnableSendfile Off > > HostnameLookups Off > > EnableMMAP on > > Timeout 120 > > KeepAlive On > > MaxKeepAliveRequests 1024 > > KeepAliveTimeout 15 > > > > Anyone seen this perhaps a better way of doing it? > > > > Thanks > > Mark > > > > _______________________________________________ > > freebsd-isp@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" > > > > -- > > There is no way to happiness > Happiness is the way > > ------------------------------------------------------------------- > Andrew McNaughton http://www.scoop.co.nz/ > andrew@scoop.co.nz Mobile: +61 422 753 792 > > -- > pgp encrypted mail welcome > keyid: 70F6C32D keyserver: pgp.mit.edu > 5688 2396 AA81 036A EBAC 2DD4 1BEA 7975 A84F 6686 >