Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL

From: Karl DeBisschop <kdebisschop(at)alert(dot)infoplease(dot)com>
To: Frank Joerdens <frank(at)joerdens(dot)de>
Cc: The Hermit Hacker <scrappy(at)hub(dot)org>, Charles Tassell <ctassell(at)isn(dot)net>, Adam Lang <aalang(at)rutgersinsurance(dot)com>, pgsql-general(at)postgresql(dot)org, scherf(at)ventasoft(dot)de
Subject: Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL
Date: 2000-11-16 18:45:36
Message-ID: 3A142B50.AF609D7A@alert.infoplease.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Frank Joerdens wrote:
>
> The Hermit Hacker wrote:
> >
> > On Wed, 15 Nov 2000, Charles Tassell wrote:
> >
> > > Just a note, I've been using Postgres 7.02 and PHP 4.02 or 4.03 for about a
> > > month in a couple sites, and haven't experienced any problems with
> > > persistent connections. Problem might have been fixed in one of the point
> > > releases, or maybe I just don't have enough different db connections to
> > > trigger it.
> >
> > I run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove
> > the useof pg_pconnect() since it is broken. Broken how, you might
> > ask? Well, I ran on a standalone machine, no other web users but myself,
> > to test, and each tim eI hit the database with IMP,. it opened a new
> > backend, but it never reused old, idle ones ... eventually, you run out of
> > the ability to connect since you've locked up all connections ...
>
> That sounds pretty evil. Have you also tested PHP3 by any chance? Has this been posted to
> php-general? If this is a general issue, it would have to be considered a _very_ nasty bug
> indeed. Can you describe how you made the test, i.e. how you saw that it wouldn't reuse
> idle ones and keeps opening new ones? How would you monitor this?

We have looked into the issue. Our conclusion was that persistent
connections are allocated by httpd process. They are persistent,
but not shared. Thus, if you have hundredes of httpd processes,
you have issues (fewer if you don't tune postgres max allowable
backends). Or if there is more than one user or DB
per httpd process.

We have seen the same behavior on PHP3 and on PHP4.

Maybe our diagnosis is wrong. I would love to be able to
use persistent connections. But I don't think it is a bug
per say. The docs talk about persistence. They say nothing
about pooling. (maybe phplib will do this -- I have not
looked).
use persistent

--
Karl DeBisschop kdebisschop(at)alert(dot)infoplease(dot)com
Learning Network Reference http://www.infoplease.com
Netsaint Plugin Developer kdebisschop(at)users(dot)sourceforge(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jason Everett 2000-11-16 18:47:23 Datestyle and Postmaster
Previous Message Adam Lang 2000-11-16 18:29:39 Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2000-11-16 19:10:02 Questions on RI spec (poss. bugs)
Previous Message Peter Eisentraut 2000-11-16 18:38:46 Re: AW: AW: AW: Coping with 'C' vs 'newC' function language nam esh