From: | "Dave Cramer" <Dave(at)micro-automation(dot)net> |
---|---|
To: | "'Peter V(dot) Cooper'" <pvcooper(at)gte(dot)net>, <pgsql-jdbc(at)postgresql(dot)org> |
Cc: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: New to Postgresql - Backend timeout /JDBC |
Date: | 2002-02-06 17:15:36 |
Message-ID: | 01fe01c1af31$e4b15610$8201a8c0@inspiron |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Peter,
There really is no difference as far as the jvm/jdbc driver are
concerned. They don't know they are on a local machine, or a remote
machine. I keep connections open across machines for days.
Are you using ipchains, or some other firewall software that could be
shutting down an idle connection?
Dave
-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Peter V. Cooper
Sent: Wednesday, February 06, 2002 11:57 AM
To: pgsql-jdbc(at)postgresql(dot)org
Cc: pvcooper(at)gte(dot)net
Subject: Re: [JDBC] New to Postgresql - Backend timeout /JDBC
The JDBC client here is really the middle layer in a three tier
configuration where the
JDBC client tries to keep an open connection to the server at all times
in
order to more
quickly respond to web page requests from the HTML / HTTP browser front
end. I have verified that when the JVM is on the same machine as the
server there is not a problem. The two other cases separate machines for
the server and
the JDBC
client on a LAN and separate machines for the server and the JDBC client
over a WAN.
I am trying to verify or deny both cases. Anyone with further comments,
experiences or
solutions than Tom Lane?
BTW, the information that the connection timed out when on separate
networks seems to be
around 5 minutes according to the place where the time out was being
experienced.
>To: "Peter V. Cooper" <pvcooper(at)gte(dot)net>
>cc: pgsql-bugs(at)postgresql(dot)org
>Subject: Re: [BUGS] New to Postgresql - Backend timeout /JDBC
>Comments: In-reply-to "Peter V. Cooper" <pvcooper(at)gte(dot)net>
> message dated "Thu, 31 Jan 2002 09:40:58 -0800"
>Date: Thu, 31 Jan 2002 12:57:56 -0500
>From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>
>"Peter V. Cooper" <pvcooper(at)gte(dot)net> writes:
> > I make the assertion that a servlet which has a connection open to
> > the database at all times (a servlet/tomcat connection object) and
> > is physically located on the same LAN as the database could easily
> > have a Internet user connected remotely step away from his/her desk
> > for an hour or more and then return to run a JDBC statement. This
> > would cause the JDBC driver to attempt to use the connection object.
> > In using this connection object I am told, and will verify
> > personally, that the information on the closed connection may take
> > 30 seconds to inform the JDBC client running in the middle tier that
> > the connection is closed and that code needs to be run to reconnect
> > this connection.
>
>If true (which I doubt), the problem is *entirely* on the client side.
>Neither the backend nor the TCP transport layer would have the
>slightest difficulty with this scenario. The KEEPALIVE timeout I
>mentioned would only come into play given an hour-long connectivity
>failure of your LAN, or a system-level crash of your client machine,
>neither of which are likely to result from a user taking a lunch break.
>
>However, I'm not very familiar with Java and so I cannot dismiss the
>possibility that some layer inside the JVM might take it upon itself to
>close an open TCP connection after a period of inactivity.
>
>If you are able to reproduce a problem of this sort then you need to be
>looking inside the Java code. The backend is not causing it.
>
>The pgsql-jdbc list might be a better place to ask if anyone knows of
>such problems in a JDBC context. Not sure how many JDBC people read
>pgsql-bugs.
>
> regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Peter V. Cooper | 2002-02-06 17:28:20 | Re: New to Postgresql - Backend timeout /JDBC |
Previous Message | Peter V. Cooper | 2002-02-06 16:56:49 | Re: New to Postgresql - Backend timeout /JDBC |