pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgress jobs stick around after they have completed
4+ messages / 3 participants
[nested] [flat]

* Postgress jobs stick around after they have completed
@ 2001-06-25 19:05  Chris Ruprecht <chrup999@yahoo.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Chris Ruprecht @ 2001-06-25 19:05 UTC (permalink / raw)
  To: pgsql-php

Hi all,

This is on:
RedHat Linux 7.0
Apache 1.3.20
PHP 4.0.6
PostGreSQL 7.1.2

I run a procedure which does a  $conn = pg_connect(...); and later a $res =
pg_close( $conn );
The later returns '1' as a result - not sure if that is good or bad (0 =
false, 1 = true?). However, I have the completed job still hanging around
when I do a ps -ef:
postgres  7493   928 14 13:55 ?        00:00:34 postgres: apache phones
[local]

Where am I going wrong?

Best regards,
Chris


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




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

* Re: Postgress jobs stick around after they have completed
@ 2001-06-25 22:28  Grant <grant@conprojan.com.au>
  parent: Chris Ruprecht <chrup999@yahoo.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Grant @ 2001-06-25 22:28 UTC (permalink / raw)
  To: pgsql-php

you have persistent connections enabled in php.ini?




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

* RE: Postgress jobs stick around after they have completed
@ 2001-06-25 22:32  Hunter, Ray <rhunter@enterasys.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Hunter, Ray @ 2001-06-25 22:32 UTC (permalink / raw)
  To: 'Chris Ruprecht' <chrup999@yahoo.com>; +Cc: pgsql-php

You might want to have the connection be a "pg_pconnect()" and then use a
close() to close the connection.  

Ray

-----Original Message-----
From: Chris Ruprecht [mailto:chrup999@yahoo.com]
Sent: Monday, June 25, 2001 1:06 PM
To: p-php
Subject: [PHP] Postgress jobs stick around after they have completed


Hi all,

This is on:
RedHat Linux 7.0
Apache 1.3.20
PHP 4.0.6
PostGreSQL 7.1.2

I run a procedure which does a  $conn = pg_connect(...); and later a $res =
pg_close( $conn );
The later returns '1' as a result - not sure if that is good or bad (0 =
false, 1 = true?). However, I have the completed job still hanging around
when I do a ps -ef:
postgres  7493   928 14 13:55 ?        00:00:34 postgres: apache phones
[local]

Where am I going wrong?

Best regards,
Chris


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

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

* Re: Postgress jobs stick around after they have completed
@ 2001-06-29 02:03  Chris Ruprecht <chrup999@yahoo.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Chris Ruprecht @ 2001-06-29 02:03 UTC (permalink / raw)
  To: pgsql-php

on 06/25/2001 23:09, Jason k Larson at jlarson@techpilots.net wrote:

> Hello -
> 
> Your result of 1 means the close was (supposedly) successful.  Not
> sure why you have processes still running though.  I would certainly
> expect this pg_pconnect .. are you certain that nowhere else in the
> script is attempting persistent connections?  Or was using persistent
> connections .. when in doubt .. try restarting Apache (apachectl
> restart) and see if this process goes away (as it should if PHP
> launched it, etc.)

Ok - I found the bug - I did a pg_pconnect(...). After I changed that to a
pg_connect, the session terminated upon pg_close( ... ).

Since I have not quite been able to locate any docs on PHP-PG connections
and their commands - why would I use a persistent connection? What can I do
with it? Will it stay open until - when?

Thanks for your help guys!!
Chris


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




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


end of thread, other threads:[~2001-06-29 02:03 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-25 19:05 Postgress jobs stick around after they have completed Chris Ruprecht <chrup999@yahoo.com>
2001-06-25 22:28 ` Grant <grant@conprojan.com.au>
2001-06-25 22:32 RE: Postgress jobs stick around after they have completed Hunter, Ray <rhunter@enterasys.com>
2001-06-29 02:03 Re: Postgress jobs stick around after they have completed Chris Ruprecht <chrup999@yahoo.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