PHP: Too many open links (0) with libpg7.4.3

Started by NTPTalmost 22 years ago4 messagesgeneral
Jump to latest
#1NTPT
ntpt@centrum.cz

Hi

I try to upgrade postgresql 7.3.3 to 7.4.3 on my machine running Apache
2.0.49 and PHP 4.3.7

Because i use another path for postgres 7.4 there (luckily) stay a old
libpg
So while i compile php with --with-pgsql=shared an old, 7.3.3 libpg is used
by PHP. Everything fine, run and works.

But specifing for php configure corect path --with-pgsql=path_to_new
postgresq , pglib 7.4.3 is used and result (after reboot ) is

Warning: pg_pconnect(): Cannot create new link. Too many open links (0) .

There was not a change of php.ini file and phpinfo() returns proper values ,
correctly find libpg7.4.3 and other properties. I even try to set
pgsql.max_links and pgsql.max_persistent from -1 (unlimited) to some
value without effect....

Where is a problem ?

#2Martín Marqués
martin@bugs.unl.edu.ar
In reply to: NTPT (#1)
Re: PHP: Too many open links (0) with libpg7.4.3

El Jue 24 Jun 2004 08:19, NTPT escribió:

Hi

I try to upgrade postgresql 7.3.3 to 7.4.3 on my machine running Apache
2.0.49 and PHP 4.3.7

Because i use another path for postgres 7.4 there (luckily) stay a old
libpg
So while i compile php with --with-pgsql=shared an old, 7.3.3 libpg is used
by PHP. Everything fine, run and works.

But specifing for php configure corect path --with-pgsql=path_to_new
postgresq , pglib 7.4.3 is used and result (after reboot ) is

Warning: pg_pconnect(): Cannot create new link. Too many open links (0) .

There was not a change of php.ini file and phpinfo() returns proper values
, correctly find libpg7.4.3 and other properties. I even try to set
pgsql.max_links and pgsql.max_persistent from -1 (unlimited) to some
value without effect....

Maybe PG ran out of posible conections. Checkout how many conections you have
open (PostgreSQL conections), and how many PHP has of those (php_info() will
give you that info).

--
08:55:02 up 14:28, 1 user, load average: 0.18, 0.32, 0.45
-----------------------------------------------------------------
Martín Marqués | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica | DBA, Programador, Administrador
Universidad Nacional
del Litoral
-----------------------------------------------------------------

#3NTPT
ntpt@centrum.cz
In reply to: Martín Marqués (#2)
Re: PHP: Too many open links (0) with libpg7.4.3

phpinfo() say that there was 0 connections !. Ie not connections at all
from PHP. Seems that PHP with libpg7.4.3 is not able to start connections
at all....

And I am pretty sure there was not other connections to postgres form other
sources (local from psql ) so postgresql can not run out connections. And,
recompilling php with old libpg7.3.3 fix the problem...

----- Original Message -----
From: "Martin Marques" <martin@bugs.unl.edu.ar>
To: "NTPT" <ntpt@centrum.cz>
Cc: "Postgres General" <pgsql-general@postgresql.org>
Sent: Thursday, June 24, 2004 1:59 PM
Subject: Re: [GENERAL] PHP: Too many open links (0) with libpg7.4.3

El Jue 24 Jun 2004 08:19, NTPT escribió:

Hi

I try to upgrade postgresql 7.3.3 to 7.4.3 on my machine running Apache
2.0.49 and PHP 4.3.7

Because i use another path for postgres 7.4 there (luckily) stay a old
libpg
So while i compile php with --with-pgsql=shared an old, 7.3.3 libpg is

used

by PHP. Everything fine, run and works.

But specifing for php configure corect path --with-pgsql=path_to_new
postgresq , pglib 7.4.3 is used and result (after reboot ) is

Warning: pg_pconnect(): Cannot create new link. Too many open links (0)

.

There was not a change of php.ini file and phpinfo() returns proper

values

, correctly find libpg7.4.3 and other properties. I even try to set
pgsql.max_links and pgsql.max_persistent from -1 (unlimited) to some
value without effect....

Maybe PG ran out of posible conections. Checkout how many conections you

have

open (PostgreSQL conections), and how many PHP has of those (php_info()

will

Show quoted text

give you that info).

--
08:55:02 up 14:28, 1 user, load average: 0.18, 0.32, 0.45
-----------------------------------------------------------------
Martín Marqués | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica | DBA, Programador, Administrador
Universidad Nacional
del Litoral
-----------------------------------------------------------------

#4Richard Huxton
dev@archonet.com
In reply to: NTPT (#3)
Re: PHP: Too many open links (0) with libpg7.4.3

NTPT wrote:

phpinfo() say that there was 0 connections !. Ie not connections at all
from PHP. Seems that PHP with libpg7.4.3 is not able to start connections
at all....

Try turning up the logging (particularly the connection logging) in your
postgresql.conf and make see if a connection is attempted at all. It
might be that PHP is getting the error message wrong (PG's error
messages were reworked for 7.4)

--
Richard Huxton
Archonet Ltd