pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedConnections dropped randomly
4+ messages / 3 participants
[nested] [flat]
* Connections dropped randomly
@ 2004-09-02 23:09 Mike Bridge <mike@bridgecanada.com>
2004-09-02 23:27 ` Re: Connections dropped randomly Dave Cramer <pg@fastcrypt.com>
2004-09-06 01:56 ` Re: Connections dropped randomly Oliver Jowett <oliver@opencloud.com>
0 siblings, 2 replies; 4+ messages in thread
From: Mike Bridge @ 2004-09-02 23:09 UTC (permalink / raw)
To: pgsql-jdbc
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.
I had this problem in postgres 7.3, and it's still there after
upgrading to 7.4.4 & pg74.215.jdbc2.jar.
Thanks,
-Mike
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Connections dropped randomly
2004-09-02 23:09 Connections dropped randomly Mike Bridge <mike@bridgecanada.com>
@ 2004-09-02 23:27 ` Dave Cramer <pg@fastcrypt.com>
2004-09-08 16:03 ` Re: Connections dropped randomly Mike Bridge <mike@bridgecanada.com>
1 sibling, 1 reply; 4+ messages in thread
From: Dave Cramer @ 2004-09-02 23:27 UTC (permalink / raw)
To: Mike Bridge <mike@bridgecanada.com>; +Cc: pgsql-jdbc
Without seeing your code, or your setup, it's hard to say.
But given that exactly the same thing is done by lots of other people
without the problem, I'd be hard pressed to say it's a bug in the
driver, or postgresql.
Dave
On Thu, 2004-09-02 at 19:09, 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.
>
> I had this problem in postgres 7.3, and it's still there after
> upgrading to 7.4.4 & pg74.215.jdbc2.jar.
>
> Thanks,
>
> -Mike
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
--
Dave Cramer
519 939 0336
ICQ # 14675561
www.postgresintl.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Connections dropped randomly
2004-09-02 23:09 Connections dropped randomly Mike Bridge <mike@bridgecanada.com>
2004-09-02 23:27 ` Re: Connections dropped randomly Dave Cramer <pg@fastcrypt.com>
@ 2004-09-08 16:03 ` Mike Bridge <mike@bridgecanada.com>
0 siblings, 0 replies; 4+ messages in thread
From: Mike Bridge @ 2004-09-08 16:03 UTC (permalink / raw)
To: pgsql-jdbc; +Cc: pg@fastcrypt.com
I think I may have finally figured out the source of this problem. I'm
getting a connection from a JDO connection manager (but not using
JDO here), and it reaps these connections with no activity after
10 seconds by default. Under load, some of the updates can take this
long, so I've upped the timeout, and this seems to have taken care
of the problem so far.
Thanks,
-Mike
----- Original Message -----
From: "Dave Cramer" <pg@fastcrypt.com>
To: "Mike Bridge" <mike@bridgecanada.com>
Cc: <pgsql-jdbc@postgresql.org>
Sent: Thursday, September 02, 2004 5:27 PM
Subject: Re: [JDBC] Connections dropped randomly
> Without seeing your code, or your setup, it's hard to say.
>
> But given that exactly the same thing is done by lots of other people
> without the problem, I'd be hard pressed to say it's a bug in the
> driver, or postgresql.
>
> Dave
> On Thu, 2004-09-02 at 19:09, 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.
> >
> > I had this problem in postgres 7.3, and it's still there after
> > upgrading to 7.4.4 & pg74.215.jdbc2.jar.
> >
> > Thanks,
> >
> > -Mike
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 8: explain analyze is your friend
> --
> Dave Cramer
> 519 939 0336
> ICQ # 14675561
> www.postgresintl.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Connections dropped randomly
2004-09-02 23:09 Connections dropped randomly Mike Bridge <mike@bridgecanada.com>
@ 2004-09-06 01:56 ` Oliver Jowett <oliver@opencloud.com>
1 sibling, 0 replies; 4+ messages in thread
From: Oliver Jowett @ 2004-09-06 01:56 UTC (permalink / raw)
To: Mike Bridge <mike@bridgecanada.com>; +Cc: 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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2004-09-08 16:03 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-02 23:09 Connections dropped randomly Mike Bridge <mike@bridgecanada.com>
2004-09-02 23:27 ` Dave Cramer <pg@fastcrypt.com>
2004-09-08 16:03 ` Mike Bridge <mike@bridgecanada.com>
2004-09-06 01:56 ` Oliver Jowett <oliver@opencloud.com>
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