Received: from web13008.mail.yahoo.com (web13008.mail.yahoo.com [216.136.174.18]) by postgresql.org (8.11.3/8.11.4) with SMTP id f79DnMP92543 for ; Thu, 9 Aug 2001 09:49:23 -0400 (EDT) (envelope-from bmatzelle@yahoo.com) Message-ID: <20010809134919.9991.qmail@web13008.mail.yahoo.com> Received: from [146.145.232.35] by web13008.mail.yahoo.com; Thu, 09 Aug 2001 06:49:19 PDT Date: Thu, 9 Aug 2001 06:49:19 -0700 (PDT) From: "Brent R. Matzelle" Subject: RE: pg_connect vs. pg_pconnect To: pgsql-php@postgresql.org In-Reply-To: <59358A738F45D51186A30008C74CE2500A0846@slc-exc1.ctron.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200108/9 X-Sequence-Number: 504 --- "Hunter, Ray" 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/