Hi,

Each new DBCP release brings fixes, additions,  and other updates, as you
can read in the release notes.

How to best configure DBCP for any given combination of JDBC driver, its
database, and application will be quite variable, which is somewhat out of
scope here IMO.

Gary

On Fri, Dec 18, 2020, 11:15 Hrafn Malmquist <[email protected]>
wrote:

> Good day
>
> I'm wondering what are optimal defaults for DSpace, open source digital
> repository software aimed especially at  academic, non-profit, and
> commercial organizations (see https://duraspace.org/dspace/).
>
> DSpace supports both Postgres and Oracle and recommends Tomcat, Jetty or
> Caucho Resin. I suspect 9/10 installations use Tomcat.
>
> DSpace comes packaged with Apache Commons DCBP 2.1.1. DSpace only
> configures three configurations for DBCP2 using non-default settings. (see:
> [1] and [2])
>
> These are
> maxTotal = 30
> maxIdle = 10
> maxWaitMillis = 5000
>
> I am not sure what reasoning is behind the choice of these configuration
> settings. DSpace is used by all sorts of institutions, some receiving very
> high traffic. My guess is that using the DBCP2 defaults is recommended. My
> question is, is this a good default configuration? Should there be more
> configuration configurable by DSpace users in the DSpace config? There have
> been reports of the database not being reachable because of too many idle
> connections. According to one doc [3] maxWaitMillis should be at a
> minimum of 10000 ms if I understand correctly.
>
> Also, I assume there are benefits to upgrading the DBCP2 dependency to the
> most recent version, 2.8.0. I'm not sure what the major benefits are
> though. I can see v. 2.5.0 only runs on Java 8.
>
> [1] -
>
> https://github.com/DSpace/DSpace/blob/755f0732aeea7dd1449830593caa54d77890e5bd/dspace/config/local.cfg.EXAMPLE#L88-L99
> [2] -
>
> https://github.com/DSpace/DSpace/blob/755f0732aeea7dd1449830593caa54d77890e5bd/dspace/config/spring/api/core-hibernate.xml#L46-L48
> [3] -
>
> https://tomcat.apache.org/tomcat-8.0-doc/jndi-datasource-examples-howto.html#Intermittent_Database_Connection_Failures
>

Reply via email to