Re: Connections dropped randomly

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Mike Bridge <mike(at)bridgecanada(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connections dropped randomly
Date: 2004-09-06 01:56:00
Message-ID: 413BC3B0.7090500@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Mike Bridge wrote:
> I find that if I reuse a jdbc connection to perform a number of
> update queries (e.g. 1000), the connection keeps getting dropped
> after a random number of iterations.
>
> This occurs in all sorts of queries throughout my application. Any
> idea what might be causing this? I'm not doing anything
> out-of-the-ordinary, and it happens on both prepared statements
> and regular statements.

The usual cause of lost connections is a stateful firewall (or NAT, etc)
between the client and server. If a connection stays idle for too long,
the firewall may consider that connection dead and reject subsequent
traffic on it. The driver doesn't discover this until the next time the
connection is used.

If that's not it, at a minimum we'd need to see a stack trace of the
error you get to diagnose this any further.

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Paul Thomas 2004-09-06 07:58:44 Re: Out of topic - Need help with connecting Java programs on Linux to Access DB - reg.
Previous Message Leo Martin Orfei 2004-09-04 16:07:47 problems returning a resultset from a function