Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Database high availability

For public-sector database and infrastructure teams. What Exponential itself offers for database availability (connection retries, read replicas on MySQL and MariaDB, Oracle failover settings), what is left to the…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/operations/availability/database-high-availability.md

On this page

Database high availability

This page is for database administrators and infrastructure teams in public bodies who must keep the database of an Exponential site available when a database machine fails. It answers what Exponential does on its own, what it leaves to the database engine, and what switching to a standby database involves. The references are 9 Databases and Database support.

Contents

  1. What Exponential does and does not do
  2. Per engine
  3. Switching to a standby database
  4. Testing it
  5. Checklist

What Exponential does and does not do

Exponential connects to one database server per site, named in site.ini [DatabaseSettings] Server. It has:

FeatureSettingEngines
Retries when the first connection fails[DatabaseSettings] ConnectRetries (shipped 0)MySQL, PostgreSQL, SQLite
Reads sent to replicasUseSlaveServer with SlaveServerArray[] (shipped disabled)MySQL and MariaDB only
A descriptor over several listeners, failover, retriesezoracle.ini [ConnectionSettings] Hosts[], Failover, RetryCountOracle

It has no built-in automatic failover for PostgreSQL, MariaDB or MySQL: if the server named in Server fails, the site cannot reach its database until that address works again. Database availability is therefore the job of the database platform: its replication, a virtual IP or DNS name that moves to the standby, or a proxy in front of the database. Choose what your database team already runs.

Per engine

EngineAvailability optionsNotes
1. SQLite 3none of its ownone host; no replication; recover from backups (9.2)
2. PostgreSQLits own replication and point-in-time recoveryset up with the PostgreSQL documentation
3. MongoDBsee the vendor's documentationread the MongoDB limits first
4. MariaDB, 6. MySQLthe server's replication; Exponential can read from replicasRead replicas
5. Oracle[ConnectionSettings] failover over several listeners, DRCP, retriesevery feature is off by default (9.6)

For a public body with a continuity duty, SQLite is the wrong engine once the duty asks for a standby database; plan the move to a database server (Changing the database engine).

Switching to a standby database

When the platform has no moving address and you switch by hand, the change on the Exponential side is one setting. The database steps (promoting the standby) follow your engine's documentation.

  1. Put the site into maintenance, so nobody writes during the switch:

    php bin/php/maintenance.php on --message="Switching database" --until=30m --allow-root-user
  2. Promote the standby with the database's own tools.

  3. Change Server (and Port if needed) in settings/override/site.ini.append.php, [DatabaseSettings]; with a cluster, also the cluster's database settings and CLUSTER_STORAGE_HOST.

  4. Clear the INI cache and make the engine read the new value:

    php bin/php/ezcache.php --clear-tag=ini --allow-root-user
    ./console exp:velocity deploy --allow-root-user

    Under PHP-FPM without Velocity, reload the PHP-FPM that serves the site.

  5. Check the site, then end maintenance:

    php bin/php/maintenance.php off --allow-root-user

A DNS name or virtual address that the database team moves makes step 3 unnecessary, and is the better design.

Testing it

A standby that was never switched to is a hope. Test the switch on a test environment (Environments for development, test and production), measure how long it takes, and record the time with your recovery objectives. After a real switch, check content published just before the failure: replication lag can lose the last writes.

Checklist

  • To do: The engine supports the continuity duty (not SQLite when a standby is required).
  • To do: The database team runs replication and owns the promotion procedure.
  • To do: The site reaches the database through an address that can move, or the manual switch is documented.
  • To do: ConnectRetries is decided.
  • To do: The switch was tested and its time recorded.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x