pg_connect(): Cannot create new link
pg_connect(): Cannot create new link
am 14.01.2004 15:42:32 von mauro.folcarelli
I have the same problem posted by James Ward (Date: Mon, 15 Sep 2003)
I migrated from (postgresql-7.3.2-3 and php-4.2.2-17) to
(postgresql-7.3.4-2 and php-4.3.3-6).
When I connect to the Database via php, I get the following message:
Warning: pg_connect(): Cannot create new link. Too many open links (0).
I didn't change any configuration file: everything used to work.
It's the first connection to the database
(max connections should be 32 by default).
Is it a bug ? Any solution?
Is there a chance to bypass it?
Thanks a lot.
Mauro Folcarelli
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Re: pg_connect(): Cannot create new link
am 16.01.2004 18:42:47 von Scott Marlowe
On Wed, 14 Jan 2004 mauro.folcarelli@sistinf.it wrote:
> I have the same problem posted by James Ward (Date: Mon, 15 Sep 2003)
>
> I migrated from (postgresql-7.3.2-3 and php-4.2.2-17) to
> (postgresql-7.3.4-2 and php-4.3.3-6).
>
> When I connect to the Database via php, I get the following message:
>
> Warning: pg_connect(): Cannot create new link. Too many open links (0).
>
> I didn't change any configuration file: everything used to work.
> It's the first connection to the database
> (max connections should be 32 by default).
>
> Is it a bug ? Any solution?
> Is there a chance to bypass it?
What does
ps ax|grep postgres|wc -l
say? If it says 34 or so, then yes, you have that many connections. You
may have a problem with your apache processes hanging / dying oddly and
keeping the postgresql connections open. restart postgresql with
pg_ctl -m fast stop
pg_ctl start
and see if you can connect.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Re: pg_connect(): Cannot create new link
am 17.01.2004 02:04:39 von ljb
mauro.folcarelli@sistinf.it wrote:
> I have the same problem posted by James Ward (Date: Mon, 15 Sep 2003)
>
> I migrated from (postgresql-7.3.2-3 and php-4.2.2-17) to
> (postgresql-7.3.4-2 and php-4.3.3-6).
>
> When I connect to the Database via php, I get the following message:
>
> Warning: pg_connect(): Cannot create new link. Too many open links (0).
>
> I didn't change any configuration file: everything used to work.
> It's the first connection to the database
> (max connections should be 32 by default).
>
> Is it a bug ? Any solution?
> Is there a chance to bypass it?
Did you check for the same situation which was causing him the problem?
He wrote:
:: I had installed the latest version of PHP with postgres support built-in.
:: But in the previous version I had those sorts of extensions as shared
:: extensions.
:: Because none of the config files had changed it was still loading the OLD
:: extensions.
:: Once I deleted them it worked fine.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Re: pg_connect(): Cannot create new link
am 19.01.2004 18:21:46 von Adam Alkins
This is a multi-part message in MIME format.
--------------060801000102040302070404
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Try replacing your php.ini file with a default distribution file.
mauro.folcarelli@sistinf.it wrote:
>I have the same problem posted by James Ward (Date: Mon, 15 Sep 2003)
>
>I migrated from (postgresql-7.3.2-3 and php-4.2.2-17) to
> (postgresql-7.3.4-2 and php-4.3.3-6).
>
>When I connect to the Database via php, I get the following message:
>
>Warning: pg_connect(): Cannot create new link. Too many open links (0).
>
>I didn't change any configuration file: everything used to work.
>It's the first connection to the database
>(max connections should be 32 by default).
>
>Is it a bug ? Any solution?
>Is there a chance to bypass it?
>
>Thanks a lot.
>Mauro Folcarelli
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
>
>
>
--
Adam Alkins
1-868-627-9115
http://www.rasadam.com
--------------060801000102040302070404
Content-Type: text/x-vcard; charset=utf8;
name="postgresql.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="postgresql.vcf"
begin:vcard
fn:Adam Alkins
n:Alkins;Adam
org:Snikla enterprises;I.T.
adr:;;#8 French Street;Woodbrook;;;Trinidad and Tobago
email;internet:postgresql at (@) rasadam dot (.) com
title:PHP Programmer
tel;work:1-868-627-9115
tel;fax:1-868-627-9117
tel;cell:1-868-756-5173
x-mozilla-html:FALSE
url:http://www.snikla.com
version:2.1
end:vcard
--------------060801000102040302070404
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
--------------060801000102040302070404--
Re: pg_connect(): Cannot create new link
am 20.01.2004 08:46:21 von mauro.folcarelli
In my /etc/php.ini file I had this line:
extension=pgsql.so
(now removed).
; Note: For Red Hat Linux, packaged extension modules are now loaded via
; the ini files in the directory /etc/php.d.
# ls -l /etc/php.d
-rw-r--r-- 1 root root 51 10 nov 16:40 pgsql.ini
# cat /etc/php.d/pgsql.ini
; Enable pgsql extension module
extension=pgsql.so
Thank you for help!
Now it's ok!!
Mauro
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org