X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 92D38D1DA30 for ; Wed, 14 Jan 2004 13:43:39 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 05747-10 for ; Wed, 14 Jan 2004 09:43:11 -0400 (AST) Received: from quasar.skima.is (quasar.skima.is [212.30.200.205]) by svr1.postgresql.org (Postfix) with ESMTP id 3BBC1D1B4C5 for ; Wed, 14 Jan 2004 09:43:07 -0400 (AST) Received: from physicallink.com ([194.144.34.89] [194.144.34.89]) by quasar.skima.is with ESMTP; Wed, 14 Jan 2004 13:43:10 Z Message-Id: <400547B1.7000202@physicallink.com> Date: Wed, 14 Jan 2004 13:44:17 +0000 From: =?ISO-8859-1?Q?J=F3n_Ragnarsson?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; is-IS; rv:1.5) Gecko/20031007 X-Accept-Language: is, en-us, en MIME-Version: 1.0 Cc: pgsql-performance@postgresql.org Subject: Re: 100 simultaneous connections, critical limit? References: <40053A91.5060001@physicallink.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/140 X-Sequence-Number: 5315 Ok, connection pooling was the thing that I thought of first, but I haven't found any docs regarding pooling with PHP+Postgres. OTOH, I designed the application to be as independent from the DB as possible. (No stored procedures or other Postgres specific stuff) Thanks, J. Christopher Browne wrote: > Clinging to sanity, jonr@physicallink.com (Jón Ragnarsson) mumbled into her beard: > >>I am writing a website that will probably have some traffic. >>Right now I wrap every .php page in pg_connect() and pg_close(). >>Then I read somewhere that Postgres only supports 100 simultaneous >>connections (default). Is that a limitation? Should I use some other >>method when writing code for high-traffic website? > > > I thought the out-of-the-box default was 32. > > If you honestly need a LOT of connections, you can configure the > database to support more. I "upped the limit" on one system to have > 512 the other week; certainly supportable, if you have the RAM for it. > > It is, however, quite likely that the connect()/close() cuts down on > the efficiency of your application. If PHP supports some form of > "connection pooling," you should consider using that, as it will cut > down _dramatically_ on the amount of work done establishing/closing > connections, and should let your apps use somewhat fewer connections > more effectively.