X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2A5CFD1D544 for ; Fri, 16 Jan 2004 17:46:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 30451-10 for ; Fri, 16 Jan 2004 13:46:01 -0400 (AST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id CE9A6D1B446 for ; Fri, 16 Jan 2004 13:45:59 -0400 (AST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.10/8.12.10) with ESMTP id i0GHiTKK001785; Fri, 16 Jan 2004 10:44:29 -0700 (MST) Date: Fri, 16 Jan 2004 10:42:47 -0700 (MST) From: "scott.marlowe" To: Cc: Subject: Re: pg_connect(): Cannot create new link In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/17 X-Sequence-Number: 2533 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.