Skip to content

Commit 974fde1

Browse files
authored
Merge pull request #11730 from cesarpferreira/11729-db-conn-recov-doc
add documentation for database connection recovery
2 parents ee3af4a + 7aa7735 commit 974fde1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

doc/sphinx-guides/source/installation/config.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,28 @@ Logging & Slow Performance
957957
- When set to true, all JDBC calls will be logged allowing tracing of all JDBC interactions including SQL.
958958
- ``false``
959959

960+
Database Configuration Tips
961+
+++++++++++++++++++++++++++
962+
963+
In this section you can find some example scenarios of advanced configuration for the database connection that can improve service performance and availability.
964+
965+
Database Connection Recovery
966+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
967+
968+
Consider the following scenario: if there is no advanced configuration for the database connection and the Dataverse server loses that connection, for example if the database host is down, the server will be "dead" even after the database server is back to normal.
969+
The only solution to recover Dataverse would be to restart the service. To avoid this situation, the following settings can be used to configure validation of the database connection.
970+
This way, the database connection can be automatically recovered after a failure, improving the server availability. For a Docker installation, it is suggested to create an init.d script so that if the container needs to be recreated, these settings will always be configured.
971+
972+
.. code-block:: bash
960973
974+
# Enable database connection validation
975+
asadmin create-jvm-options "-Ddataverse.db.is-connection-validation-required=true"
976+
# Configure to use a database table as the validation method
977+
asadmin create-jvm-options "-Ddataverse.db.connection-validation-method=table"
978+
# Configure the "setting" table to be used for connection validation, but any tables can be used
979+
asadmin create-jvm-options "-Ddataverse.db.validation-table-name=setting"
980+
# Configure a validation period of 60 seconds, but different values may be used
981+
asadmin create-jvm-options "-Ddataverse.db.validate-atmost-once-period-in-seconds=60"
961982
962983
.. _file-storage:
963984

0 commit comments

Comments
 (0)