X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 784443A48C5 for ; Thu, 4 Nov 2004 16:00:55 +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 15446-02 for ; Thu, 4 Nov 2004 16:00:53 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.198]) by svr1.postgresql.org (Postfix) with ESMTP id 882843A48C1 for ; Thu, 4 Nov 2004 16:00:52 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id a41so272350rng for ; Thu, 04 Nov 2004 08:00:40 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=MVFZETZSspNYNb+GiX9BlAQvrGwGuZbuelqqqXdihmVLmuXtJpsb6Hmgmcl1D2TeGSG7Lk4FlAwsb0x7fhrIGhGpSALOaJAu9vU3A3ZC0yeRhuS+j2YWgKlLYeDroRIMiPZYB/M3wYq5urbqtt3BVANUrN/8H9PWzWGKVOmmdfo= Received: by 10.38.218.39 with SMTP id q39mr647762rng; Thu, 04 Nov 2004 08:00:40 -0800 (PST) Received: by 10.38.165.10 with HTTP; Thu, 4 Nov 2004 08:00:38 -0800 (PST) Message-ID: Date: Thu, 4 Nov 2004 10:00:38 -0600 From: Kevin Barnard Reply-To: Kevin Barnard To: Martin Foster Subject: Re: [PERFORM] Restricting Postgres Cc: PostgreSQL In-Reply-To: <418A2BE2.70609@ethereal-realms.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <1099509684.4320.2.camel@localhost.localdomain> <41894CD9.8090308@ethereal-realms.org> <1099570740.4320.196.camel@localhost.localdomain> <418A2BE2.70609@ethereal-realms.org> 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/124 X-Sequence-Number: 68205 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. On Thu, 04 Nov 2004 08:17:22 -0500, Martin Foster wrote: > Apache has a global setting for load average limits, the above was just > a module which extended the capability. It might also make sense to > have limitations set on schema's which can be used in a similar way to > Apache directories. > > While for most people the database protecting itself against a sudden > surge of high traffic would be undesirable. It can help those who run > dynamically driven sites and get slammed by Slashdot for example. > > > > Martin Foster > Creator/Designer Ethereal Realms > martin@ethereal-realms.org > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster >