diff --git a/doc/sphinx-guides/source/installation/config.rst b/doc/sphinx-guides/source/installation/config.rst index b0c44865927..67621e5eb8c 100644 --- a/doc/sphinx-guides/source/installation/config.rst +++ b/doc/sphinx-guides/source/installation/config.rst @@ -957,7 +957,28 @@ Logging & Slow Performance - When set to true, all JDBC calls will be logged allowing tracing of all JDBC interactions including SQL. - ``false`` +Database Configuration Tips ++++++++++++++++++++++++++++ + +In this section you can find some example scenarios of advanced configuration for the database connection that can improve service performance and availability. + +Database Connection Recovery +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +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. +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. +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. + +.. code-block:: bash + # Enable database connection validation + asadmin create-jvm-options "-Ddataverse.db.is-connection-validation-required=true" + # Configure to use a database table as the validation method + asadmin create-jvm-options "-Ddataverse.db.connection-validation-method=table" + # Configure the "setting" table to be used for connection validation, but any tables can be used + asadmin create-jvm-options "-Ddataverse.db.validation-table-name=setting" + # Configure a validation period of 60 seconds, but different values may be used + asadmin create-jvm-options "-Ddataverse.db.validate-atmost-once-period-in-seconds=60" .. _file-storage: