pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Lang <aalang@rutgersinsurance.com>
To: pgsql-php@postgresql.org
Subject: Re: persistant connections?
Date: Fri, 8 Dec 2000 09:43:47 -0500
Message-ID: <002e01c06125$466237a0$330a0a0a@6014cwpza006> (raw)
References: <3A308CDA.5080009@animated.net.au>

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?




view thread (2+ messages)

Message-ID: <002e01c06125$466237a0$330a0a0a@6014cwpza006>
Permalink:  ../002e01c06125$466237a0$330a0a0a@6014cwpza006/
Also on:    postgresql.org/message-id/002e01c06125$466237a0$330a0a0a@6014cwpza006

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: aalang@rutgersinsurance.com
  Subject: Re: persistant connections?
  In-Reply-To: <002e01c06125$466237a0$330a0a0a@6014cwpza006>
  References: <3A308CDA.5080009@animated.net.au> <002e01c06125$466237a0$330a0a0a@6014cwpza006>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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