You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Shihad Salam <sh...@gmail.com> on 2019/10/31 06:17:02 UTC

DB Connection Restore Issue with Apache Commons DBCP 2.5.0

Hi Team,

Please help me in resolving the below issue:

While using the DBCP2 (2.5.0) connection pool in my SpringBoot project with
MS SQL Server, the database connection is not restoring after a DB service
restart. This is working fine when using the SpringBoot default Hikari
Connection Pool. Is this a bug with DBCP2?  If not, how can I solve this
issue?

I have used the below configurations:
**.dbcp2.test-while-idle=true*
**.dbcp2.test-on-borrow=true*
**.dbcp2.time-between-eviction-runs-millis=60000*
**.dbcp2.validation-query=SELECT 1*
**.dbcp2.min-idle=1*
**.dbcp2.max-total=100*

**.dbcp2.max-idle=50*

P.S : If this mail is not intended to this mail group, please forward to
the respective team.

Thanks,
Shihad

Re: DB Connection Restore Issue with Apache Commons DBCP 2.5.0

Posted by Gary Gregory <ga...@gmail.com>.
Hi,

I would try the current version 2.7.0 to see if the problem exists there as
well. If it does, then the best thing to do might be to reproduce the issue
in a way where anyone can also reproduce it, by for example, creating a
self-contained failing unit test in a PR on GitHub with an in-memory
database like H2. You should also make sure you are using the current
version of the MS-SQL JDBC driver. This might be a lot of work but your
description is really not enough to go on.

Gary

On Thu, Oct 31, 2019 at 5:09 AM Shihad Salam <sh...@gmail.com> wrote:

> Hi Team,
>
> Please help me in resolving the below issue:
>
> While using the DBCP2 (2.5.0) connection pool in my SpringBoot project with
> MS SQL Server, the database connection is not restoring after a DB service
> restart. This is working fine when using the SpringBoot default Hikari
> Connection Pool. Is this a bug with DBCP2?  If not, how can I solve this
> issue?
>
> I have used the below configurations:
> **.dbcp2.test-while-idle=true*
> **.dbcp2.test-on-borrow=true*
> **.dbcp2.time-between-eviction-runs-millis=60000*
> **.dbcp2.validation-query=SELECT 1*
> **.dbcp2.min-idle=1*
> **.dbcp2.max-total=100*
>
> **.dbcp2.max-idle=50*
>
> P.S : If this mail is not intended to this mail group, please forward to
> the respective team.
>
> Thanks,
> Shihad
>

Re: DB Connection Restore Issue with Apache Commons DBCP 2.5.0

Posted by Phil Steitz <ph...@gmail.com>.
What exactly do you mean by "restoring?"

Phil

On 10/30/19 11:17 PM, Shihad Salam wrote:
> Hi Team,
>
> Please help me in resolving the below issue:
>
> While using the DBCP2 (2.5.0) connection pool in my SpringBoot project with
> MS SQL Server, the database connection is not restoring after a DB service
> restart. This is working fine when using the SpringBoot default Hikari
> Connection Pool. Is this a bug with DBCP2?  If not, how can I solve this
> issue?
>
> I have used the below configurations:
> **.dbcp2.test-while-idle=true*
> **.dbcp2.test-on-borrow=true*
> **.dbcp2.time-between-eviction-runs-millis=60000*
> **.dbcp2.validation-query=SELECT 1*
> **.dbcp2.min-idle=1*
> **.dbcp2.max-total=100*
>
> **.dbcp2.max-idle=50*
>
> P.S : If this mail is not intended to this mail group, please forward to
> the respective team.
>
> Thanks,
> Shihad
>


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