From: Oliver Jowett <oliver@opencloud.com>
To: Mike Bridge <mike@bridgecanada.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Connections dropped randomly
Date: Mon, 06 Sep 2004 13:56:00 +1200
Message-ID: <413BC3B0.7090500@opencloud.com> (raw)
In-Reply-To: <20040902170953.A19017@bridgecanada.com>
References: <20040902170953.A19017@bridgecanada.com>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, mike@bridgecanada.com
Subject: Re: Connections dropped randomly
In-Reply-To: <413BC3B0.7090500@opencloud.com>
References: <20040902170953.A19017@bridgecanada.com> <413BC3B0.7090500@opencloud.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