You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The database health check introduced in serverinfo (Settings → Administration → Overview → Database checks) always reports the "Replica lag" rule (Slave_lag, formula Slave_running, test value == 0) as failed on a standalone database server that was never configured for replication.
Slave_running is a MySQL/MariaDB global status variable that is OFF on ANY server not acting as a replica — this is the normal, expected state, not an error. The rule doesn't check whether the server is actually configured as a replica (e.g. via SHOW REPLICA STATUS returning a row, or read_only/gtid_slave_pos being set) before evaluating.
$rules[] = newRule(
id: 'Slave_lag',
name: 'Replica lag',
category: 'Replication',
severity: Rule::SEVERITY_ALERT,
formula: 'Slave_running',
test: 'value == 0',
issue: 'A configured replica is not running.',
recommendation: 'Check the replica with SHOW REPLICA STATUS; resolve any IO/SQL errors and restart replication.',
justification: 'Slave_running is reporting OFF.',
justificationFormula: '',
requires: ['Slave_running'],
);
To Reproduce
Run any standalone Nextcloud instance with a single, non-replicated MySQL/MariaDB server.
Open Settings → Administration → Overview → Database checks.
"Replica lag" is listed under "Failed" with "A configured replica is not running." — even though no replica was ever configured.
Expected behavior
The rule should first verify that the instance is actually configured as a replica (e.g. SHOW REPLICA STATUS returns a row) before evaluating Slave_running, and be skipped entirely otherwise — consistent with how other inapplicable rules in the same rule set are already skipped ("Skipped").
Environment
Nextcloud 35.0.1 (serverinfo 7.0.0) — first observed immediately after upgrading 33.0.9 → 34.0.4 → 35.0.1, so likely introduced in serverinfo 6.0.0 or 7.0.0
MariaDB 10.11.14
Confirmed via SHOW REPLICA STATUS returning zero rows (no replica configured at all)
Activity
kesselb commentedon Sep 30, 2026
Duplicate of #1147