X-Original-To: pgsql-php-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5572B9FA6B1 for ; Tue, 1 Aug 2006 06:42:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 15747-02 for ; Tue, 1 Aug 2006 06:42:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ireds.ics.co.at (static62-99-190-22vienna-afrik-xdsl-line.inode.at [62.99.190.22]) by postgresql.org (Postfix) with ESMTP id 42DCF9FA6B5 for ; Tue, 1 Aug 2006 06:42:07 -0300 (ADT) Received: from X40 (static62-99-190-19vienna-afrik-xdsl-line.inode.at [62.99.190.19]) by ireds.ics.co.at (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id k719Mt707310; Tue, 1 Aug 2006 11:22:56 +0200 Reply-To: From: "Peter Hofer" To: "=?iso-8859-1?Q?'Herv=E9_Piedvache'?=" , Subject: Re: connection pool Date: Tue, 1 Aug 2006 11:46:43 +0200 Organization: Internet Consulting Service Message-ID: <000601c6b54f$6589eea0$6515a8c0@ics2003.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Thread-Index: Aca1PH5nJvW6JPePT7SRehGY3q8j0wAEHP0A In-Reply-To: <200608010929.00466.herve@elma.fr> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.168 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/2 X-Sequence-Number: 3573 Hy=20 Thanks for your answer=20 As far as i know " pgsql.max_persistent " limits the no on=20 Persistent Connections per apache client - and not for all=20 Apaches - so I set it "pgsql.max_persistent =3D 1" since we=20 Connect to the same DB all the time=20 Currently we got 2 Servers runnung with persistent Connection,=20 and 2 Server with non-persitent connections=20 Right now i have 359 progres running, 345 are idle.=20 If I set the other servers to persistent connections, too, I will have=20 About 700 progres running - 95% on idle=20 They all take memory ...=20 I will have to expand up to 10 and more WebServers in near future=20 Therefore persistent-Connection (because of the memory amount to handle = 1500 Connection) nor=20 Non-persistent-Connection (because of forking ) is a suitable way=20 What I think about, is a maschine getting all the Connections from the Apache, and=20 Forward only those to the DB whitch are not idle=20 Any idea ?=20 Thanks=20 Peter=20 > -----Urspr=FCngliche Nachricht----- > Von: pgsql-php-owner@postgresql.org=20 > [mailto:pgsql-php-owner@postgresql.org] Im Auftrag von Herv=E9 = Piedvache > Gesendet: Dienstag, 01. August 2006 09:29 > An: pgsql-php@postgresql.org; peter.hofer@ics.at > Betreff: Re: [PHP] connection pool >=20 > Hi, >=20 > I had the same trouble 6 years ago with my beginning of Postgresql ... >=20 > 4 web and 1 db ... >=20 > Just put a limitation in the php.ini >=20 > ; Maximum number of persistent links. -1 means no limit. > pgsql.max_persistent =3D 18 >=20 > ; Maximum number of links (persistent+non persistent). -1=20 > means no limit. > pgsql.max_links =3D 18 >=20 > It'll run perfectly ... for me it's like that since 6 years=20 > ... and I have thousand of visitor each day on my services :o) >=20 > Regards, >=20 > Le lundi 31 juillet 2006 21:48, Peter Hofer a =E9crit : > > Hallo > > > > Need your help > > > > 1 got a Site runnig php 4.4.2 and postgresql (8.1.4) and Follwing=20 > > problem > > > > - 4 Server (Apache) up to 300 clients connection to the DB > > - 1 DB machine > > > > So: > > > > - If I run with persisent, i got up to 1200 Connction and I run out > > of memeory > > > > - if I run with no persisent connection i got massive=20 > forking of postgres > > (but less problems) > > > > How can I build up a Pool of Connections ? > > > > What about "Pgpool" ? > > > > Thanks > > > > > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------(end of=20 > > broadcast)--------------------------- > > TIP 5: don't forget to increase your free space map settings >=20 > -- > Herv=E9 Piedvache >=20 > NOUVELLE ADRESSE - NEW ADDRESS : > Elma Ing=E9nierie Informatique > 3 rue d'Uz=E8s > F-75002 - Paris - France > Pho. 33-144949901 > Fax. 33-144882747 >=20 > ---------------------------(end of=20 > broadcast)--------------------------- > TIP 4: Have you searched our list archives? >=20 > http://archives.postgresql.org