Received: from dymwsm06.mailwatch.com (dymwsm06.mailwatch.com [204.253.83.42]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7AHjUP22098 for ; Fri, 10 Aug 2001 13:45:30 -0400 (EDT) (envelope-from cleonell@visteon.com) Received: from mwsc0202.mw4.mailwatch.com (mwsc0202.mw4.mailwatch.com [204.253.83.132]) by dymwsm06.mailwatch.com (8.11.0/8.11.0) with ESMTP id f7AHjPN29872 for ; Fri, 10 Aug 2001 13:45:25 -0400 Received: from mail pickup service by mwsc0202.mw4.mailwatch.com with Microsoft SMTPSVC; Fri, 10 Aug 2001 13:45:56 -0400 Received: from 204.253.83.34 ([204.253.83.34]) by MWSC0202 with SMTP id 000200029e18ee46-3720-4eaa-8782-ce102b9ea244; Fri, 10 Aug 2001 13:45:56 -0500 Received: from eccmfw1.ford.com (mailfw1.ford.com [136.1.1.26]) by dymwsm12.mailwatch.com (8.11.0/8.11.0) with ESMTP id f7AHjOp11697 for ; Fri, 10 Aug 2001 13:45:25 -0400 Message-Id: <200108101745.f7AHjOp11697@dymwsm12.mailwatch.com> Received: by mailfw1.ford.com id NAA28637 (InterLock SMTP Gateway 4.2 for pgsql-php@postgresql.org); Fri, 10 Aug 2001 13:42:45 -0400 (EDT) Received: by mailfw1.ford.com (Internal Mail Agent-1); Fri, 10 Aug 2001 13:42:45 -0400 (EDT) Received: by mailfw1.ford.com (Internal Mail Agent-0); Fri, 10 Aug 2001 13:42:45 -0400 (EDT) From: "Leonello, Chris (C.R.)" To: "'Hunter, Ray'" , "'Chris Ruprecht'" Cc: "Pgsql-php (E-mail)" Subject: RE: pg_connect vs. pg_pconnect Date: Fri, 10 Aug 2001 13:45:23 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2651.58) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C121C4.3B06E9E0" HOP-COUNT: 1 X-MAILWATCH-INSTANCEID: 010200029e18ee46-3720-4eaa-8782-ce102b9ea244 X-OriginalArrivalTime: 10 Aug 2001 17:45:56.0103 (UTC) FILETIME=[4EB75970:01C121C4] X-Archive-Number: 200108/11 X-Sequence-Number: 506 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C121C4.3B06E9E0 Content-Type: text/plain; charset="iso-8859-1" Note that pg_close will not close persistent links (this is stated in the docs). I have not found anything in the PHP docs that indicates what will close a persistent connection. However, I do believe there is a bug. I noticed with php version 4.03pl1 and PostgreSQL 7.03 that I would receive errors like "not a valid PostgreSQL result resource" when trying use persistent connections and had dozens of lingering postgres processes. Apparently, not only was PHP not detecting existing open persistent connections and using them, it was then getting confused as it opened new connections. I did not have this problem with an earlier version of PHP (possibly 4.01?) that I was using on a development server. When I switched to pg_connect, the problem disappeared. There are bug reports on php.net relating to this problem, (#8769, #12558, #11771, ...). There have been other posts to the list (2/5/01 and 4/18/01) which I believe all point to this same problem with persistent connections not working and/or lingering forever. I don't have any solutions, but I would be interested to hear from anyone having similar problems because I think this is wide spread (for those using p_connect). Maybe we will stumble across some solution or I will gather enough info to put together one coherent and specific bug report. Current bug reports are either closed because the were too vague, closed with the response that persistent connections are not supposed to close (never ever close...?) or still unassigned. -----Original Message----- From: Hunter, Ray [mailto:rhunter@enterasys.com] Sent: Thursday, August 09, 2001 9:02 AM To: 'Chris Ruprecht' Cc: Pgsql-php (E-mail) Subject: RE: pg_connect vs. pg_pconnect Chris, I am currently doing testing right now and finding that this is the case. I think that there is some kind of bug. I have to go in and manually kill the sleeping processes that are remaining after the pg_pconnect calls. Another question for you is why does pg_pconnect work when pg_connect does not. I am running into this problem as I change some of the connections to pg_connect from pg_pconnect? Thanks, RAY HUNTER Automated Test Group Software Support Engineer ENTERASYS NETWORKS rhunter@enterasys.com www.enterasys.com -----Original Message----- From: Chris Ruprecht [mailto:chrup999@yahoo.com] Sent: Thursday, August 09, 2001 6:52 AM To: Hunter, Ray Subject: Re: [PHP] pg_connect vs. pg_pconnect Ray, I had the same problem (PG 7.1.2 on RedHat 7.0) and changed the procedures to only use pg_connect. The is probably a bug in the pg_pconnect ... pg_close functions. Best regards, Chris ----- Original Message ----- From: Hunter, Ray To: Pgsql-php (E-mail) Sent: Thursday, August 09, 2001 7:42 AM Subject: RE: [PHP] pg_connect vs. pg_pconnect I am using both. When I use pg_pconnect it seems that the connections are still sleeping even after I close the connection ( pg_close( $conn ) ). RAY HUNTER Automated Test Group Software Support Engineer ENTERASYS NETWORKS Internal: 53888 Phone: 801 887-9888 Fax: 801 972-5789 Cellular: 801 698-0622 rhunter@enterasys.com www.enterasys.com -----Original Message----- From: Mitch Vincent [ mailto:mvincent@cablespeed.com ] Sent: Wednesday, August 08, 2001 6:10 PM To: Hunter, Ray; pgsql-php@postgresql.org Subject: Re: [PHP] pg_connect vs. pg_pconnect If you're using pg_connect they should be terminating... Are you using pg_connect or pg_pconnect? -Mitch Software development : You can have it cheap, fast or working. Choose two. ----- Original Message ----- From: "Hunter, Ray" To: Sent: Wednesday, August 08, 2001 7:40 PM Subject: [PHP] pg_connect vs. pg_pconnect > I understand the difference between the two functions. However, when I > watch my process under process management I notice that I have tons of > sleeping process that are lingering. How can I make it so that when I > connect to postgres and query that the connect process is then terminated? > These sleeping connections are eating up my resources. > > > Any suggestions? > > > > RAY HUNTER > Automated Test Group > Software Support Engineer > > ENTERASYS NETWORKS > > Internal: 53888 > Phone: 801 887-9888 > Fax: 801 972-5789 > Cellular: 801 698-0622 > > rhunter@enterasys.com > > www.enterasys.com > ------_=_NextPart_001_01C121C4.3B06E9E0 Content-Type: text/html; charset="iso-8859-1" RE: [PHP] pg_connect vs. pg_pconnect
Note that pg_close will not close persistent links (this is stated in the docs).  I have not found anything in the PHP docs that indicates what will close a persistent connection.
 
However, I do believe there is a bug.  I noticed with php version 4.03pl1 and PostgreSQL 7.03 that I would receive errors like "not a valid PostgreSQL result resource" when trying use persistent connections and had dozens of lingering postgres processes.  Apparently, not only was PHP not detecting existing open persistent connections and using them, it was then getting confused as it opened new connections.  I did not have this problem with an earlier version of PHP (possibly 4.01?) that I was using on a development server.  When I switched to pg_connect, the problem disappeared.
 
There are bug reports on php.net relating to this problem, (#8769, #12558, #11771, ...).  There have been other posts to the list (2/5/01 and 4/18/01) which I believe all point to this same problem with persistent connections not working and/or lingering forever.  I don't have any solutions, but I would be interested to hear from anyone having similar problems because I think this is wide spread (for those using p_connect).  Maybe we will stumble across some solution or I will gather enough info to put together one coherent and specific bug report.  Current bug reports are either closed because the were too vague, closed with the response that persistent connections are not supposed to close (never ever close...?) or still unassigned.
-----Original Message-----
From: Hunter, Ray [mailto:rhunter@enterasys.com]
Sent: Thursday, August 09, 2001 9:02 AM
To: 'Chris Ruprecht'
Cc: Pgsql-php (E-mail)
Subject: RE: pg_connect vs. pg_pconnect

Chris,
 
I am currently doing testing right now and finding that this is the case.  I think that there is some kind of bug.  I have to go in and manually kill the sleeping processes that are remaining after the pg_pconnect calls. 
 
Another question for you is why does pg_pconnect work when pg_connect does not.  I am running into this problem as I change some of the connections to pg_connect from pg_pconnect?
 

Thanks,


RAY HUNTER
Automated Test Group
Software Support Engineer

ENTERASYS NETWORKS

rhunter@enterasys.com

www.enterasys.com


 

-----Original Message-----
From: Chris Ruprecht [mailto:chrup999@yahoo.com]
Sent: Thursday, August 09, 2001 6:52 AM
To: Hunter, Ray
Subject: Re: [PHP] pg_connect vs. pg_pconnect

Ray,
 
I had the same problem (PG 7.1.2 on RedHat 7.0) and changed the procedures to only use pg_connect. The is probably a bug in the pg_pconnect ... pg_close functions.
 
Best regards,
Chris
 
----- Original Message -----
Sent: Thursday, August 09, 2001 7:42 AM
Subject: RE: [PHP] pg_connect vs. pg_pconnect

I am using both.  When I use pg_pconnect it seems that the connections are still sleeping even after I close the connection ( pg_close( $conn ) ).


 
 
 
RAY HUNTER
Automated Test Group
Software Support Engineer
 
ENTERASYS NETWORKS
 
Internal:    53888
Phone:       801 887-9888
Fax:         801 972-5789
Cellular:    801 698-0622

rhunter@enterasys.com
 
www.enterasys.com


-----Original Message-----
From: Mitch Vincent [mailto:mvincent@cablespeed.com]
Sent: Wednesday, August 08, 2001 6:10 PM
To: Hunter, Ray; pgsql-php@postgresql.org
Subject: Re: [PHP] pg_connect vs. pg_pconnect


If you're using pg_connect they should be terminating... Are you using
pg_connect or pg_pconnect?

-Mitch
Software development :
You can have it cheap, fast or working. Choose two.

----- Original Message -----
From: "Hunter, Ray" <rhunter@enterasys.com>
To: <pgsql-php@postgresql.org>
Sent: Wednesday, August 08, 2001 7:40 PM
Subject: [PHP] pg_connect vs. pg_pconnect


> I understand the difference between the two functions.  However, when I
> watch my process under process management I notice that I have tons of
> sleeping process that are lingering.  How can I make it so that when I
> connect to postgres and query that the connect process is then terminated?
> These sleeping connections are eating up my resources.
>
>
> Any suggestions?
>
>
>
> RAY HUNTER
> Automated Test Group
> Software Support Engineer
>
> ENTERASYS NETWORKS
>
> Internal:    53888
> Phone:       801 887-9888
> Fax:         801 972-5789
> Cellular:    801 698-0622
>
> rhunter@enterasys.com
>
> www.enterasys.com
>

------_=_NextPart_001_01C121C4.3B06E9E0--