commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linda Steckel" <Li...@FriedWire.com>
Subject RE: [dbcp] RE: How to debug closed connection problems
Date Fri, 17 Jan 2003 17:31:25 GMT
In summary, we are already using Weblogic server with weblogic connections
sucessfully.  We haven't had any pooling problems and it's been several
years of constant use.  As a seperate project, I'm trying to convert out
webservers to Tomcat and use the dbcp connection pooling (We'd like to use
open source code instead of commercial).  Is there anyone out there using
Tomcat with dbcp for heavily used commercial applications?  So, same
database setup/same hardware, different software.  I already limit the pool
to 1 and test.  It's hard to test because the problem sometimes takes a day
or two to appear and then there's no way to discover what happened.
Sometimes it just occurs with in minutes.  Either way, I can't tell what has
happened.  One thing that I am realizing is that the problem doesn't occur
in one set of servlet/classes but does occur in another.  So, my next step
is to try to see what is different between the two sets of code that use the
connections and perhaps that will give me a clue.  Again, the same code that
doesn't create connections problems in Weblogic.  I checked with the network
guy, we don't have network timeouts and if that were the problem I'd see
that in Weblogic as well I think.

I am new to this group too - I think you would post a bug to the developer's
email group.  This is the user's email group.

-----Original Message-----
From: Stephen Westbom [mailto:swestbom@yahoo.com]
Sent: Friday, January 17, 2003 10:06 AM
To: Jakarta Commons Users List
Subject: Re: [dbcp] RE: How to debug closed connection problems


Are you using weblogic defined connections?  If so, you are getting WL's
wrapper classes, not dbcp wrappers.  If not.

Can you see the socket connections to the database server?  If the database
thinks they are irretrievable that probably means that it cannot communicate
with the client but the socket is still there on its end.

You probably need to check for some network based timeout.  If this is the
problem you should be able to make it repeatable by limiting the pool to 1
connection, creating the connection on pool instantiation and then waiting.

P.S.  I am new to the user group what email address am I supposed to use to
post bugs?


--- Linda Steckel <Linda@FriedWire.com> wrote:
> 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
>
>
> --
> To unsubscribe, e-mail:
> <mailto:commons-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:commons-user-help@jakarta.apache.org>
>


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:
<mailto:commons-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:commons-user-help@jakarta.apache.org>


Mime
View raw message