Re: Connections dropped randomly - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Connections dropped randomly
Date
Msg-id 413BC3B0.7090500@opencloud.com
Whole thread Raw
In response to Connections dropped randomly  (Mike Bridge <mike@bridgecanada.com>)
List 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

pgsql-jdbc by date:

Previous
From: Shanmugasundaram Doraisamy
Date:
Subject: Out of topic - Need help with connecting Java programs on Linux to Access DB - reg.
Next
From: Paul Thomas
Date:
Subject: Re: Out of topic - Need help with connecting Java programs on Linux to Access DB - reg.