pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
persistant connections?
2+ messages / 2 participants
[nested] [flat]

* persistant connections?
@ 2000-12-08 07:25  Aarmel <pgadmin@animated.net.au>
  0 siblings, 1 reply; 2+ messages in thread

From: Aarmel @ 2000-12-08 07:25 UTC (permalink / raw)
  To: pgsql-php

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?




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: persistant connections?
@ 2000-12-08 14:43  Adam Lang <aalang@rutgersinsurance.com>
  parent: Aarmel <pgadmin@animated.net.au>
  0 siblings, 0 replies; 2+ messages in thread

From: Adam Lang @ 2000-12-08 14:43 UTC (permalink / raw)
  To: 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@animated.net.au>
To: <pgsql-php@postgresql.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?




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-12-08 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-12-08 07:25 persistant connections? Aarmel <pgadmin@animated.net.au>
2000-12-08 14:43 ` Adam Lang <aalang@rutgersinsurance.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox