X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 523673A47BB for ; Thu, 4 Nov 2004 16:15:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 19256-03 for ; Thu, 4 Nov 2004 16:15:13 +0000 (GMT) Received: from fep4.cogeco.net (smtp.cogeco.net [216.221.81.25]) by svr1.postgresql.org (Postfix) with ESMTP id A520E3A4893 for ; Thu, 4 Nov 2004 16:15:12 +0000 (GMT) Received: from [127.0.0.1] (d226-34-9.home.cgocable.net [24.226.34.9]) by fep4.cogeco.net (Postfix) with ESMTP id 2357C279E; Thu, 4 Nov 2004 11:15:12 -0500 (EST) Message-ID: <418A5590.5090006@ethereal-realms.org> Date: Thu, 04 Nov 2004 11:15:12 -0500 From: Martin Foster Organization: Ethereal Realms User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Barnard Cc: PostgreSQL Performance Subject: Re: Restricting Postgres References: <1099509684.4320.2.camel@localhost.localdomain> <41894CD9.8090308@ethereal-realms.org> <1099570740.4320.196.camel@localhost.localdomain> <418A2BE2.70609@ethereal-realms.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/45 X-Sequence-Number: 8999 Kevin Barnard wrote: > I am generally interested in a good solution for this. So far our > solution has been to increase the hardware to the point of allowing > 800 connections to the DB. > > I don't have the mod loaded for Apache, but we haven't had too many > problems there. The site is split pretty good between dynamic and > non-dynamic, it's largely Flash with several plugins to the DB. > However we still can and have been slammed and up to point of the 800 > connections. > > What I don't get is why not use pgpool? This should eliminate the > rapid fire forking of postgres instanaces in the DB server. I'm > assuming you app can safely handle a failure to connect to the DB > (i.e. exceed number of DB connections). If not it should be fairly > simple to send a 503 header when it's unable to get the connection. > Note, that I am not necessarily looking for a PostgreSQL solution to the matter. Just a way to prevent the database from killing off the server it sits on, but looking at the load averages. I have attempted to make use of pgpool and have had some very poor performance. There were constant error messages being sounded, load averages on that machine seemed to skyrocket and it just seemed to not be suited for my needs. Apache::DBI overall works better to what I require, even if it is not a pool per sey. Now if pgpool supported variable rate pooling like Apache does with it's children, it might help to even things out. That and you'd still get the spike if you have to start the webserver and database server at or around the same time. Martin Foster Creator/Designer Ethereal Realms martin@ethereal-realms.org