X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B6A4F3A25C6 for ; Thu, 30 Dec 2004 20:44:49 +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 79795-09 for ; Thu, 30 Dec 2004 20:44:26 +0000 (GMT) Received: from tomts22-srv.bellnexxia.net (tomts22.bellnexxia.net [209.226.175.184]) by svr1.postgresql.org (Postfix) with ESMTP id 846DA3A18BD for ; Thu, 30 Dec 2004 20:44:27 +0000 (GMT) Received: from acer.sympatico.ca ([65.95.133.206]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041230204427.NWSA1919.tomts22-srv.bellnexxia.net@acer.sympatico.ca> for ; Thu, 30 Dec 2004 15:44:27 -0500 Message-Id: <5.2.1.1.0.20041230153137.00a63740@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Thu, 30 Dec 2004 15:34:15 -0500 To: pgsql-php@postgresql.org From: Frank Bax Subject: Re: too many clients In-Reply-To: <1104432336.32609.44.camel@localhost> References: <988BEA40-5A6B-11D9-B3B3-0003938BDF32@localnotion.com> <330532b604122908387f7ffde2@mail.gmail.com> <0DC9A380-59AB-11D9-B3B3-0003938BDF32@localnotion.com> <330532b604122908387f7ffde2@mail.gmail.com> <5.2.1.1.0.20041229125718.00a02520@pop6.sympatico.ca> <1104363131.32605.30.camel@localhost> <87y8fg8iqi.fsf@stark.xeocode.com> <1104384788.32609.42.camel@localhost> <988BEA40-5A6B-11D9-B3B3-0003938BDF32@localnotion.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.037 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/12 X-Sequence-Number: 2970 Wrong - if username changes, another connection to same database is used within the same apache child process. Everything in the connect string must be the same before a persistent connection is reused. At 01:45 PM 12/30/04, Gavin M. Roy wrote: >Yes, php opens 1 persistant connection per apache backend per database. > >On Thu, 2004-12-30 at 09:03 -0500, Matthew Terenzio wrote: > > > > > > > > > On Thu, 2004-12-30 at 00:20 -0500, Greg Stark wrote: > > >> "Gavin M. Roy" writes: > > >> > > >>> I use it on a few very high traffic sites without issue, but it is > > >>> tuned so > > >>> that there is only 1 persistant connection per apache backend and > > >>> postgresql > > >>> will allow the max apache backends, which by default is generally > > >>> 256. I > > >>> highly recommend it in such a situation, while I generally do not > > >>> recommend > > >>> it in any other. > > So if I have one Postgres installation but two databases, is it > > possible that PHP would create twice as many persistant connections as > > apache childs? This may be where my understanding went awry. > > > > > > ---------------------------(end of > > > broadcast)--------------------------- > > > TIP 4: Don't 'kill -9' the postmaster > > > > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > > http://archives.postgresql.org