RE: pg_connect vs. pg_pconnect

From: "Brent R(dot) Matzelle" <bmatzelle(at)yahoo(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: RE: pg_connect vs. pg_pconnect
Date: 2001-08-09 13:49:19
Message-ID: 20010809134919.9991.qmail@web13008.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

--- "Hunter, Ray" <rhunter(at)enterasys(dot)com> wrote:
> Chris,
>
> I am including the php source that has the pg_pconnect and the
> problems. On
> one php page, I am query the database multilple times to get
> specific data
> in order to populate a table for our engineers.
>
> I have to use it on the create_sub_table function.
>
> I have no idea why it does not work.

I personally never mix connection types as I always use
pg_pconnect() for every connection call. I consistently get one
PostgreSQL process for each Apache process.

Your code opens up a new PostgreSQL connection for each function
call, except for create_sub_table(). As a result, you can have
many idle database processes for each httpd process. You can
count on each non-pg_pconnect() connection to linger for a
minute or so and that will eat all your system resources with
only a few simultaneous users.

Brent

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Leonello, Chris (C.R.) 2001-08-10 17:45:23 RE: pg_connect vs. pg_pconnect
Previous Message Hunter, Ray 2001-08-09 13:40:56 RE: RE: pg_connect vs. pg_pconnect