Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/release-notes/12241-simple db connector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This version of Dataverse changes the class used for connecting with Postgres. This should help avoid problems seen under high load and potentially improve performance. See #12241 for details.
3 changes: 3 additions & 0 deletions doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,9 @@ Connection Validation
* - dataverse.db.validate-atmost-once-period-in-seconds
- Specifies the time interval in seconds between successive requests to validate a connection at most once.
- ``0`` (disabled)
* - dataverse.db.fail-all-connections
- When true, refreshes all connections when one fails, speeding recover vs. detecting and refreshing connections individually.
- ``true`` (enabled)

Connection & Statement Leaks
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
name = "java:app/jdbc/dataverse",
// The app server (Payara) deploys a managed pool for this data source for us.
// We don't need to deal with this on our own.
//
// HINT: PGSimpleDataSource would work too, but as we use a connection pool, go with a javax.sql.ConnectionPoolDataSource
// HINT: PGXADataSource is unnecessary (no distributed transactions used) and breaks ingest.
className = "org.postgresql.ds.PGConnectionPoolDataSource",

className = "org.postgresql.ds.PGSimpleDataSource",

// BEWARE: as this resource is created before defaults are read from META-INF/microprofile-config.properties,
// defaults must be provided in this Payara-proprietary manner.
Expand Down Expand Up @@ -48,6 +46,7 @@
"fish.payara.validation-table-name=${MPCONFIG=dataverse.db.validation-table-name:}",
"fish.payara.validation-classname=${MPCONFIG=dataverse.db.validation-classname:}",
"fish.payara.validate-atmost-once-period-in-seconds=${MPCONFIG=dataverse.db.validate-atmost-once-period-in-seconds:0}",
"fish.payara.fail-all-connections=${MPCONFIG=dataverse.db.fail-all-connections:true}",
// LEAK DETECTION
"fish.payara.connection-leak-timeout-in-seconds=${MPCONFIG=dataverse.db.connection-leak-timeout-in-seconds:0}",
"fish.payara.connection-leak-reclaim=${MPCONFIG=dataverse.db.connection-leak-reclaim:false}",
Expand All @@ -57,6 +56,7 @@
"fish.payara.statement-timeout-in-seconds=${MPCONFIG=dataverse.db.statement-timeout-in-seconds:-1}",
"fish.payara.slow-query-threshold-in-seconds=${MPCONFIG=dataverse.db.slow-query-threshold-in-seconds:-1}",
"fish.payara.log-jdbc-calls=${MPCONFIG=dataverse.db.log-jdbc-calls:false}"

})
public class DataSourceProducer {

Expand Down
Loading