Re: RemoveAbandoned Problems

2021-12-08 Thread Phil Steitz
On 12/8/21 1:44 PM, Christopher Schultz wrote: Phil, On 12/8/21 15:23, Phil Steitz wrote: On 12/8/21 6:36 AM, Christopher Schultz wrote: Jerry, On 12/7/21 20:59, Jerry Malcolm wrote: Chris, The way I thought it worked was if I configured 'RemoveAbandonedOnBorrow' and RemoveAbandonedTime

Re: RemoveAbandoned Problems

2021-12-08 Thread Christopher Schultz
Phil, On 12/8/21 15:23, Phil Steitz wrote: On 12/8/21 6:36 AM, Christopher Schultz wrote: Jerry, On 12/7/21 20:59, Jerry Malcolm wrote: Chris, The way I thought it worked was if I configured 'RemoveAbandonedOnBorrow' and RemoveAbandonedTimeout="15" was that each time I requested a new conn

Re: RemoveAbandoned Problems

2021-12-08 Thread Phil Steitz
On 12/8/21 6:36 AM, Christopher Schultz wrote: Jerry, On 12/7/21 20:59, Jerry Malcolm wrote: Chris, The way I thought it worked was if I configured 'RemoveAbandonedOnBorrow' and RemoveAbandonedTimeout="15" was that each time I requested a new connection from the pool, any connections that

Re: RemoveAbandoned Problems

2021-12-08 Thread Jerry Malcolm
Chris, That makes total sense.  Thanks so much for clarifying this. Fortunately, I think I've got all the current set of leaks under control.  But this will help greatly for the next time I start seeing leaks. Jerry On 12/8/2021 7:36 AM, Christopher Schultz wrote: Jerry, On 12/7/21 20:59,

Re: RemoveAbandoned Problems

2021-12-08 Thread Christopher Schultz
Jerry, On 12/7/21 20:59, Jerry Malcolm wrote: Chris, The way I thought it worked was if I configured 'RemoveAbandonedOnBorrow' and RemoveAbandonedTimeout="15" was that each time I requested a new connection from the pool, any connections that had been idle for >15 minutes and had not been retu

Re: RemoveAbandoned Problems

2021-12-07 Thread Jerry Malcolm
Chris, The way I thought it worked was if I configured 'RemoveAbandonedOnBorrow' and RemoveAbandonedTimeout="15" was that each time I requested a new connection from the pool, any connections that had been idle for >15 minutes and had not been returned by my code to the pool would be recovered,

Re: RemoveAbandoned Problems

2021-12-07 Thread Christopher Schultz
Jerry, On 12/4/21 23:06, Jerry Malcolm wrote: I had a db connection leak in my code where an error condition would throw an exception and bypass the connection cleanup code. I found that and fixed it.  But before I found the problem, my program was overrunning the max connections and locking o

Re: RemoveAbandoned Problems

2021-12-06 Thread Phil Steitz
Sorry again.  Docs are here (at the bottom in the abandoned config section): https://commons.apache.org/proper/commons-dbcp/configuration.html On 12/6/21 10:01 AM, Phil Steitz wrote: On 12/5/21 2:34 PM, Jerry Malcolm wrote: Phil, Thanks for the response.  I saw that note in the docs that sa

Re: RemoveAbandoned Problems

2021-12-06 Thread Phil Steitz
On 12/5/21 2:34 PM, Jerry Malcolm wrote: Phil, Thanks for the response.  I saw that note in the docs that said the removeAbandonedOnMaintenance wouldn't do anything without an evictor service.  But removeAbandonedOnBorrow also requires an evictor service to run in order remove on borrow? 

Re: RemoveAbandoned Problems

2021-12-05 Thread Jerry Malcolm
Phil, Thanks for the response.  I saw that note in the docs that said the removeAbandonedOnMaintenance wouldn't do anything without an evictor service.  But removeAbandonedOnBorrow also requires an evictor service to run in order remove on borrow?  That's fine. Just a bit confusing that on-bo

Re: RemoveAbandoned Problems

2021-12-05 Thread Phil Steitz
In order for abandoned connection cleanup to happen, you have to have configured a maintenance (aka "evictor") thread to run.  You need to set the value of timeBetweenEvictionRunsMillis to a positive number. Phil On 12/4/21 9:06 PM, Jerry Malcolm wrote: I had a db connection leak in my code wh