commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linda Steckel" <Li...@FriedWire.com>
Subject [dbcp] RE: How to debug closed connection problems
Date Fri, 17 Jan 2003 16:58:16 GMT
Thanks for the info.  It doesn't look like your fixes got posted?
Unfortunately, none of the situations described are the problem.  We use
Oracle 8i.  We also have weblogic running and it has no problems with the
connection pooling, so I think there's something strange going on.  Also it
"appears" that the connections are not actually closed.  They still exist
but the dpcp pooling thinks they are closed and return an error.

-----Original Message-----
From: Stephen Westbom [mailto:swestbom@yahoo.com]
Sent: Tuesday, January 14, 2003 6:34 PM
To: Jakarta Commons Users List
Subject: RE: How to debug closed connection problems



I put some fixes in as well and reported them.  The ones I found are in the
result set wrapper class's close() and next() methods.  The code should
check for null in the wrapped result set because the getResultSet() method
that calls the result set wrap
per class's constructor in the statement object can have a null result set
reference.
But back to your problem.  There is probably an idle connection timeout in
the DB2 configuration, check with your DBA.  The pool would have no way of
knowing that its underlying socket connection is dead until it pings the
connection on checkout (expens
ive) or you try to use it.
The other possibility for a dead socket is a firewall or router table
timeout of the socket connection.  Check with your networking or security
people.
If either one of these is the problem you will need to set the idle
connection timeout accordingly.
 Linda Steckel <Linda@FriedWire.com> wrote:Frank,

I'd love to have your fixes.

I am having a similar problem with the connections getting closed
unexpectedly after the same code runs for hours. I'm using Oracle 8i. If I
look at the database, it appears that they are connections open (but
irretrievable?), yet the error says "Connection closed". I haven't been
able to figure out what is going on.

Thanks
Linda

-----Original Message-----
From: lawlor@athensgroup.com [mailto:lawlor@athensgroup.com]
Sent: Tuesday, January 14, 2003 4:49 PM
To: commons-user@jakarta.apache.org
Subject: How to debug closed connection problems


I'm looking for some suggestions on how to debug a problem my application
is having with closed connections using the commons connection pooling
(the REAL connection gets closed out from under the PoolableConnection).

I am running JDBC from a Window's client to either a local DB2 or a remote
DB2
database (Ver 7.2.4) from a Tomact web app.

I got the commons dbcp and pool source and instrumented it with some
printouts and discovered a couple of bugs in that code (very scarry ones
- this code is not ready for prime time). However, I am still getting
the underlying JDBC Connection closed out from under the PoolableConnection.

I instrumented all the code in the commons code where there is a
_conn.close() and all the code calling any of this code and (with my fixes)
I no longer see the pooling code doing the close of the real connection.

I added DriverManager.setLogWriter() to get added information and it does
seem to show a Connection close just before the application tries to close
the PoolableConnection, but unfortunately it doesn't give any traceback to
see who the culprit is.

My application only deals with the PoolableConnections so I don't see how it
can be doing the close of the real connection.

Does anyone have any suggestions on how I can determine what is doing this
real connection close????

Thanks,
-- Frank


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:
For additional commands, e-mail:



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Mime
View raw message