Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 25C949FB961 for ; Tue, 1 May 2007 19:10:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 84739-01 for ; Tue, 1 May 2007 19:10:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by postgresql.org (Postfix) with ESMTP id 6F8DF9FB945 for ; Tue, 1 May 2007 19:10:12 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c24so1827798ana for ; Tue, 01 May 2007 15:10:11 -0700 (PDT) Received: by 10.100.122.8 with SMTP id u8mr1444389anc.1178057411161; Tue, 01 May 2007 15:10:11 -0700 (PDT) Received: from srinilaptop ( [70.20.198.26]) by mx.google.com with ESMTP id d19sm27548and.2007.05.01.15.10.08; Tue, 01 May 2007 15:10:10 -0700 (PDT) Reply-To: From: "Srinivas Kotapally" To: "'Aaron Bono'" Cc: References: <01a101c78c37$6da02450$800101df@srinilaptop> Subject: Re: Intermittent Postgres Connection refused Errors (JDBC) Date: Tue, 1 May 2007 18:10:06 -0400 Organization: Coriendo LLC Message-ID: <01aa01c78c3d$7a71cac0$800101df@srinilaptop> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01AB_01C78C1B.F3602AC0" X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Thread-Index: AceMO+cCVCuLw0U0RoSyGhZuxDA1IAAATaJA In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/8 X-Sequence-Number: 25328 This is a multi-part message in MIME format. ------=_NextPart_000_01AB_01C78C1B.F3602AC0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Thanks for the response. No, I am not exceeding the max limit. I tried a test which would exceed the max connections (which is 100 - set in postgresql.conf). The error at that point is org.postgresql.util.PSQLException: FATAL: sorry, too many clients already _____ From: aaron.bono@gmail.com [mailto:aaron.bono@gmail.com] On Behalf Of Aaron Bono Sent: Tuesday, May 01, 2007 5:59 PM To: ksrinivas@coriendo.com Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Intermittent Postgres Connection refused Errors (JDBC) On 5/1/07, Srinivas Kotapally wrote: Hi I am managing an application that uses the Postgres backend. Of late we have started getting connection refused errors every now and then. We have not been able to identify the cause of this. Any hints or known bugs that I should be aware of? Thanks for any help extended! Regards Srinivas Here is the environment I work in: Application is a Java app residing on a web server and is running on Tomcat. Versions: jdk: 1.5.0_02 Tomcat 5.5.23 Web server: httpd-2.0.52-28.ent.centos4 Kernel: Linux version 2.6.9-42.0.10.ELsmp (mockbuild@builder5.centos.org ) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 SMP Tue Feb 27 09:40:21 EST 2007 Postgres: 8.1.8 (64 bit version) - postgresql-libs-8.1.8-1PGDG postgresql-8.1.8-1PGDG postgresql-server-8.1.8-1PGDG postgresql-contrib-8.1.8-1PGDG We use the JDBC2 driver that comes with Postgres. The specific error we get is: CDBConnectionPool.newConnection() : SQLException= org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. Are you exceeding the maximum allowed connections in PostgreSQL? I would start by checking the PostgreSQL logs. If nothing shows up, it may be a network or application configuration issue. -Aaron -- ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ================================================================== ------=_NextPart_000_01AB_01C78C1B.F3602AC0 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable
Thanks for the response.  No, I am not = exceeding the=20 max limit.  I tried a test which would exceed the max connections = (which is=20 100 - set in postgresql.conf).  The error at that point is=20
org.postgresql.util.PSQLException: FATAL: = sorry, too many=20 clients already


From: aaron.bono@gmail.com=20 [mailto:aaron.bono@gmail.com] On Behalf Of Aaron = Bono
Sent:=20 Tuesday, May 01, 2007 5:59 PM
To: = ksrinivas@coriendo.com
Cc:=20 pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Intermittent = Postgres=20 Connection refused Errors (JDBC)

On 5/1/07, Srinivas Kotapally = <ksrinivas@bisil.com> wrote:
Hi
 
I am managing an application = that uses the=20 Postgres backend.  Of late we have started getting connection = refused=20 errors every now and then.  We have not been able to identify the = cause=20 of this.  Any hints or known bugs that I should be aware = of?  Thanks=20 for any help extended!
 
Regards

Srinivas
 
Here is the environment I work=20 in:
Application is a Java app residing on a web server and is = running on=20 Tomcat. 
Versions:
jdk: = 1.5.0_02
Tomcat = 5.5.23
Web server:=20 httpd-2.0.52-28.ent.centos4
Kernel: Linux version = 2.6.9-42.0.10.ELsmp=20 (mockbuild@builder5.centos.org ) (gcc version 3.4.6 = 20060404=20 (Red Hat 3.4.6-3)) #1 SMP Tue Feb 27 09:40:21 EST 2007
Postgres: = 8.1.8 (64=20 bit version) -
postgresql-libs-8.1.8-1PGDG
postgresql-8.1.8-1PGDG
postgre= sql-server-8.1.8-1PGDG
postgresql-contrib-8.1.8-1PGDG
 
We use the JDBC2 driver that = comes with=20 Postgres.
 
The specific error we get=20 is:
 
CDBConnectionPool.newConnection() :=20 SQLException=3D org.postgresql.util.PSQLException: Connection refused. = Check=20 that the hostname and port are correct and that the postmaster is = accepting=20 TCP/IP = connections.

Are=20 you exceeding the maximum allowed connections in PostgreSQL?  I = would start=20 by checking the PostgreSQL logs.  If nothing shows up, it may be a = network=20 or application configuration issue.

-Aaron

--=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
  =20 Aaron Bono
   Aranya Software Technologies, = Inc.
   http://www.aranya.com =
   http://codeelixir.com
=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 ------=_NextPart_000_01AB_01C78C1B.F3602AC0--