pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_connect(): Cannot create new link
5+ messages / 4 participants
[nested] [flat]

* pg_connect(): Cannot create new link
@ 2004-01-14 14:42  mauro.folcarelli@sistinf.it
  0 siblings, 3 replies; 5+ messages in thread

From: mauro.folcarelli@sistinf.it @ 2004-01-14 14:42 UTC (permalink / raw)
  To: pgsql-php

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




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

* Re: pg_connect(): Cannot create new link
@ 2004-01-16 17:42  scott.marlowe <scott.marlowe@ihs.com>
  parent: mauro.folcarelli@sistinf.it
  2 siblings, 0 replies; 5+ messages in thread

From: scott.marlowe @ 2004-01-16 17:42 UTC (permalink / raw)
  To: mauro.folcarelli@sistinf.it; +Cc: pgsql-php

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.




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

* Re: pg_connect(): Cannot create new link
@ 2004-01-17 01:04  ljb <ljb220@mindspring.com>
  parent: mauro.folcarelli@sistinf.it
  2 siblings, 0 replies; 5+ messages in thread

From: ljb @ 2004-01-17 01:04 UTC (permalink / raw)
  To: pgsql-php

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.



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

* Re: pg_connect(): Cannot create new link
@ 2004-01-19 17:21  Adam Alkins <postgresql@rasadam.com>
  parent: mauro.folcarelli@sistinf.it
  2 siblings, 0 replies; 5+ messages in thread

From: Adam Alkins @ 2004-01-19 17:21 UTC (permalink / raw)
  To: mauro.folcarelli@sistinf.it; +Cc: pgsql-php

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

Attachments:

postgresql.vcf (text/x-vcard, 337B) download 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
^ permalink raw reply [nested|flat] 5+ messages in thread

* Re: pg_connect(): Cannot create new link
@ 2004-01-20 07:46  mauro.folcarelli@sistinf.it
  0 siblings, 0 replies; 5+ messages in thread

From: mauro.folcarelli@sistinf.it @ 2004-01-20 07:46 UTC (permalink / raw)
  To: pgsql-php


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




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


end of thread, other threads:[~2004-01-20 07:46 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-01-14 14:42 pg_connect(): Cannot create new link mauro.folcarelli@sistinf.it
2004-01-16 17:42 ` scott.marlowe <scott.marlowe@ihs.com>
2004-01-17 01:04 ` ljb <ljb220@mindspring.com>
2004-01-19 17:21 ` Adam Alkins <postgresql@rasadam.com>
2004-01-20 07:46 Re: pg_connect(): Cannot create new link mauro.folcarelli@sistinf.it

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