Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id CB93B2E0046 for ; Tue, 22 Apr 2008 12:41:13 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 71566-06 for ; Tue, 22 Apr 2008 12:41:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by developer.postgresql.org (Postfix) with ESMTP id 543762E0056 for ; Tue, 22 Apr 2008 12:41:04 -0300 (ADT) Received: from localhost (or-69-34-217-90.sta.embarqhsd.net [69.34.217.90]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m3MFfgTQ019895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Apr 2008 08:41:43 -0700 Date: Tue, 22 Apr 2008 08:41:09 -0700 From: "Joshua D. Drake" To: Bryan Buecking Cc: pgsql-performance@postgresql.org Subject: Re: CPU bound at 99% Message-ID: <20080422084109.18e4282e@commandprompt.com> In-Reply-To: <20080422153045.GB5961@starling-software.com> References: <20080422153045.GB5961@starling-software.com> Organization: Command Prompt, Inc. X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.9; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 22 Apr 2008 08:41:44 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/319 X-Sequence-Number: 29812 On Wed, 23 Apr 2008 00:31:01 +0900 Bryan Buecking wrote: > at any given time there is about 5-6 postgres in startup > (ps auxwww | grep postgres | grep startup | wc -l) > > about 2300 connections in idle > (ps auxwww | grep postgres | idle) > > and loads of "FATAL: sorry, too many clients already" being logged. > > The server that connects to the db is an apache server using > persistent connections. MaxClients is 2048 thus the high number of > connections needed. Application was written in PHP using the Pear DB > class. Sounds like your pooler isn't reusing connections properly. Sincerely, Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate