Re: persistant connections?

From: "Adam Lang" <aalang(at)rutgersinsurance(dot)com>
To: <pgsql-php(at)postgresql(dot)org>
Subject: Re: persistant connections?
Date: 2000-12-08 14:43:47
Message-ID: 002e01c06125$466237a0$330a0a0a@6014cwpza006
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

If used correctly, they will save resources on your system and improve
performance. To look out for is to make sure they are configured correctly.
Following is a previous email involving that topic:

From Alexey Borzov
<start quote>
Well, there's a problem with PHP's [mis]documentation. First of all,
it counts open DB connections not on per-webserver, but on
per-process/thread basis.
The default PHP config file has the limits of persistent and
non-persistent connections set to -1 (no limit)... Setting it to
some (supposedly) reasonable value (like, 50) accomplishes nothing: you
should multiply 50 by the number of webserver processes/threads. There
can be lots of them... :[
And then there comes PHP's "logic": if I can just open the new
connection, why bother reusing the old one? And thus Postgres backends
start multiplying like rabbits, eventually reaching the limit... :[
You should set a reasonable limit on number of open persistent
connections (like 1, maybe 2 or 3), only then PHP will actually reuse
them. My webserver now works with such setup and there are no more
problems with pg_pconnect().
<end quote>

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Aarmel" <pgadmin(at)animated(dot)net(dot)au>
To: <pgsql-php(at)postgresql(dot)org>
Sent: Friday, December 08, 2000 2:25 AM
Subject: [PHP] persistant connections?

> Can people give me a brief pro's and con's for persistant connections?
>
> Any major problems with them, such as ensureing they are closed for
example?

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Mark Christenson 2000-12-09 20:00:22 How to verify PHP has PostgreSQL support?
Previous Message Aarmel 2000-12-08 07:25:14 persistant connections?