commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khawaja Shams" <>
Subject Re: DBCP Returning Closed Connections
Date Wed, 17 Sep 2008 21:35:28 GMT
  Thanks Wes for the suggestion.  Should I file a bug for testOnBorrow not
testing the connections properly?

On Wed, Sep 17, 2008 at 1:11 PM, Wes Clark <> wrote:

> We've had the same problem on SQL Server. Set the "testWhileIdle" to
> test a few connections every so often.  It will keep the connections
> alive.
> -----Original Message-----
> From: Khawaja Shams []
> Sent: Wednesday, September 17, 2008 12:40 PM
> To:
> Subject: DBCP Returning Closed Connections
> Hello,   One of our servers goes through periods of activity followed by
> long idle durations.  It appears as though after the server sits idle
> for a few hours, subsequent requests to the DBCP Pool return connections
> that have already been closed. This is a bit frustrating as I could not
> find a way to take that connection out of the pool, and the same
> instance of the connection keeps getting returned to other requests.
> The connection is to a MySQL server.  I tried setting the testOnBorrow
> variable to true (I am using
> BasicDataSource) before the first time I borrow the connection, but it
> does not seem to have any impact.  Does anybody have a work around or a
> hunch as to what I may be doing wrong? Thanks.
> Regards,
> Khawaja Shams
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message