pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Aaron Bono <postgresql@aranya.com>
To: ksrinivas@coriendo.com
Cc: pgsql-admin@postgresql.org
Subject: Re: Intermittent Postgres Connection refused Errors (JDBC)
Date: Tue, 1 May 2007 17:34:37 -0500
Message-ID: <bf05e51c0705011534r156a2412s64ec5df55f1bef58@mail.gmail.com> (raw)
In-Reply-To: <01aa01c78c3d$7a71cac0$800101df@srinilaptop>
References: <01a101c78c37$6da02450$800101df@srinilaptop>
	<bf05e51c0705011458h1020a4feqccf9968324c83aec@mail.gmail.com>
	<01aa01c78c3d$7a71cac0$800101df@srinilaptop>

On 5/1/07, Srinivas Kotapally <ksrinivas@coriendo.com> wrote:
>
>  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
>

Are any errors showing up in the PostgreSQL logs?

Also, are do you have any of your already established connections in your
pool being that are begin disconnected?  If so, you may be having
intermittent network problems.

The error you are getting implies that you are having connectivity problems
between servers.  I am tomcat and PostgreSQL are running on separate
machines.  Have you tried replicating this problem by running tomcat and
PostgreSQL on the same machine and connecting to localhost?

------------------------------
> *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 <ksrinivas@bisil.com> 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
==================================================================

view thread (8+ messages)  latest in thread

Message-ID: <bf05e51c0705011534r156a2412s64ec5df55f1bef58@mail.gmail.com>
Permalink:  ../bf05e51c0705011534r156a2412s64ec5df55f1bef58@mail.gmail.com/
Also on:    postgresql.org/message-id/bf05e51c0705011534r156a2412s64ec5df55f1bef58@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: postgresql@aranya.com, ksrinivas@coriendo.com
  Subject: Re: Intermittent Postgres Connection refused Errors (JDBC)
  In-Reply-To: <bf05e51c0705011534r156a2412s64ec5df55f1bef58@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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