pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPersistent Connections with PHP and PostgreSQL
4+ messages / 2 participants
[nested] [flat]
* Persistent Connections with PHP and PostgreSQL
@ 2002-02-06 16:34 Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>
2002-02-06 18:24 ` Re: Persistent Connections with PHP and PostgreSQL Phill Kenoyer <pgsql@c0de.net>
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Nascimento @ 2002-02-06 16:34 UTC (permalink / raw)
To: pgsql-admin
Dears,
I am using PostgreSQL 7.1.3 with PHP4.0.6.
I'm trying to establish persistent connections with pg_pconnect() function
from PHP.
There are some problems like there was too many connections being
established. Sometimes I get a warning "Supplied argument is not a valid
PostgreSQL link resource in...". Other times, when I try to connect with
psql, I get "Sorry, too many clients".
Suggestions?
Is it better to use persistent connections over normal connections (despite
the fact that I have to close all the normal connections whenever I open
one.)??
Thanks
Felipe Nascimento
MultiValor.com.br
Tel.: 55 21 2505 3900 / 2505 3911
Fax: 55 21 2505 3910
<mailto:felipe.nascimento@multivalor.com.br>
<http://www.multivalor.com.br;
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Persistent Connections with PHP and PostgreSQL
2002-02-06 16:34 Persistent Connections with PHP and PostgreSQL Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>
@ 2002-02-06 18:24 ` Phill Kenoyer <pgsql@c0de.net>
0 siblings, 0 replies; 4+ messages in thread
From: Phill Kenoyer @ 2002-02-06 18:24 UTC (permalink / raw)
To: Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>; +Cc: pgsql-admin
Its a bug in PHP. Also, PHP 4.1.1 is the latest version. I have not
tried it with this new version yet. I switched from pconnect to just
connect and I did not see much difference. I dont run into the out of
connections problem any more so I'm happy.
|On 020206 10:00
|Felipe Nascimento (Felipe.Nascimento@multivalor.com.br) wrote the following...
|
|Dears,
|
|I am using PostgreSQL 7.1.3 with PHP4.0.6.
|I'm trying to establish persistent connections with pg_pconnect() function
|from PHP.
|There are some problems like there was too many connections being
|established. Sometimes I get a warning "Supplied argument is not a valid
|PostgreSQL link resource in...". Other times, when I try to connect with
|psql, I get "Sorry, too many clients".
|
|Suggestions?
|
|Is it better to use persistent connections over normal connections (despite
|the fact that I have to close all the normal connections whenever I open
|one.)??
--
BOFH Reason of the day: We only support a 28000 bps connection.
_ | _
(_()(|('.|)('||.|()|`|(
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Persistent Connections with PHP and PostgreSQL
@ 2002-02-06 21:10 Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>
2002-02-06 21:16 ` Re: Persistent Connections with PHP and PostgreSQL Phill Kenoyer <pgsql@c0de.net>
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Nascimento @ 2002-02-06 21:10 UTC (permalink / raw)
To: 'Phill Kenoyer' <pgsql@c0de.net>; Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>; +Cc: pgsql-admin
Do I have to call pg_close() every time at the end of the script??
Tks
Felipe
-----Original Message-----
From: Phill Kenoyer [mailto:pgsql@c0de.net]
Sent: quarta-feira, 6 de fevereiro de 2002 16:24
To: Felipe Nascimento
Cc: 'pgsql-admin@postgresql.org'
Subject: Re: [ADMIN] Persistent Connections with PHP and PostgreSQL
Its a bug in PHP. Also, PHP 4.1.1 is the latest version. I have not
tried it with this new version yet. I switched from pconnect to just
connect and I did not see much difference. I dont run into the out of
connections problem any more so I'm happy.
|On 020206 10:00
|Felipe Nascimento (Felipe.Nascimento@multivalor.com.br) wrote the
following...
|
|Dears,
|
|I am using PostgreSQL 7.1.3 with PHP4.0.6.
|I'm trying to establish persistent connections with pg_pconnect() function
|from PHP.
|There are some problems like there was too many connections being
|established. Sometimes I get a warning "Supplied argument is not a valid
|PostgreSQL link resource in...". Other times, when I try to connect with
|psql, I get "Sorry, too many clients".
|
|Suggestions?
|
|Is it better to use persistent connections over normal connections (despite
|the fact that I have to close all the normal connections whenever I open
|one.)??
--
BOFH Reason of the day: We only support a 28000 bps connection.
_ | _
(_()(|('.|)('||.|()|`|(
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Persistent Connections with PHP and PostgreSQL
2002-02-06 21:10 Re: Persistent Connections with PHP and PostgreSQL Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>
@ 2002-02-06 21:16 ` Phill Kenoyer <pgsql@c0de.net>
0 siblings, 0 replies; 4+ messages in thread
From: Phill Kenoyer @ 2002-02-06 21:16 UTC (permalink / raw)
To: Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>; +Cc: pgsql-admin
PHP will close the connection at the end of the script. I always call
pg_close() when I'm done accessing the db. If your script is short and
quick, then it should not be a problem. If it does some more processing
on the data after you finished with the connection, why keep it open?
|On 020206 13:11
|Felipe Nascimento (Felipe.Nascimento@multivalor.com.br) wrote the following...
|
|Do I have to call pg_close() every time at the end of the script??
|
|Tks
|Felipe
|
--
BOFH Reason of the day: backup tape overwritten with copy of system manager's favourite CD
_ | _
(_()(|('.|)('||.|()|`|(
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-02-06 21:16 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-06 16:34 Persistent Connections with PHP and PostgreSQL Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>
2002-02-06 18:24 ` Phill Kenoyer <pgsql@c0de.net>
2002-02-06 21:10 Re: Persistent Connections with PHP and PostgreSQL Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>
2002-02-06 21:16 ` Phill Kenoyer <pgsql@c0de.net>
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