commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Fwd: Re: [dbcp] Abandon Connection - not Logging in standalone
Date Mon, 27 Jul 2015 00:03:35 GMT
Forgot to copy list

-------- Forwarded Message --------
Subject: 	Re: [dbcp] Abandon Connection - not Logging in standalone
Date: 	Sun, 26 Jul 2015 17:02:38 -0700
From: 	Phil Steitz <>
To: 	Bernd Eckenfels <>

On 7/25/15 8:19 AM, Bernd Eckenfels wrote:
> Am Sat, 25 Jul 2015 07:57:57 -0700
> schrieb Phil Steitz <>:
>> BasicDataSource allows you to directly set the abandoned connection
>> log writer.  Your code uses PoolingDataSource, which requires you to
>> configure the underlying object pool manually, so you need to use
>> the setLogWriter method of the AbandonedConfig instance you use to
>> configure the pool.
> I tried that as well, but it did not help.
>> Try looking at a thread dump.  Another possibility is that the
>> evictor thread is hung waiting on a driver action.  
> Thats why the output contains a thread dump, there the evictor thread
> was idle.
> I guess I would have to debug it.

I am sorry I did not see the thread dump.  I did some testing and I
think I now know what is going on.  If you add
acfg.setLogWriter(new PrintWriter(System.out, true));

you will see the stack trace.  This is a bug in Commons Pool.  The
default logwriter is not set up to autoflush and the
DefaultPooledObject (what DBCP uses) does not flush the
PrintWriter.  Thanks for reporting it and sorry to be slow to dig
into it.

I will open the pool bug.

> Gruss
> Bernd

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

View raw message