ProxySQL Cluster peers exchange configuration via a pull-based sync protocol. When sync stalls or conflicts, peers diverge silently. Clients on proxy A get one set of backends; clients on proxy B get a different set. The same query routes to different hostgroups. Credentials differ. Query rules match differently.
The detection signal is stats_proxysql_servers_checksums. Each peer computes a checksum per config module. When peers agree, checksums match. When they disagree, diff_check climbs for the affected module. Persistent mismatch means the cluster is not converging.
This applies only to ProxySQL Cluster deployments. Standalone instances leave stats_proxysql_servers_checksums unpopulated.
What this means
At least two peers have different runtime configuration for the same module. The operational impact depends on which module diverged:
mysql_serversdivergence: clients routed to different backend sets. Write queries may land on different primaries. Traffic distribution assumptions break.mysql_query_rulesdivergence: the same query matches different rules on different proxies. Read/write splitting and cache rules break. Traffic lands on wrong hostgroups.mysql_usersdivergence: different credentials in effect. Some proxies reject connections that others accept.admin_variablesormysql_variablesdivergence: runtime behavior (monitor intervals, shun thresholds, multiplexing) differs across peers, producing inconsistent backend health decisions.
Six modules generate checksums in current ProxySQL releases: mysql_query_rules, mysql_servers, mysql_users, proxysql_servers, admin_variables, and mysql_variables.
Each node polls peers at admin-cluster_check_interval_ms (default 1000 ms). When a mismatch persists for admin-cluster_*_diffs_before_sync consecutive checks (default 3), the node pulls config from the peer with the highest epoch, provided that peer’s version is greater than 1. A node at version=1 is never a sync source. This prevents a freshly restarted node with stale disk config from overwriting the cluster.
Convergence should happen within roughly admin-cluster_check_interval_ms multiplied by 3. When checksums stay mismatched beyond that window, the pull is failing or no valid source exists.
flowchart TD
A["Checksum mismatch detected"] --> B{"All peers at
version 1?"}
B -->|Yes| C["No valid sync source.
Rolling restart trap."]
B -->|No| D{"diff_check climbing
without convergence?"}
D -->|Yes| E{"Which module
diverges?"}
D -->|No, stable diff| F["Stable divergence.
Network or config conflict."]
E -->|"mysql_servers"| G["Check auxiliary
hostgroup tables"]
E -->|"mysql_query_rules"| H["Check rule order
and checksum variables"]
E -->|"mysql_users"| I["Check credential
rotation window"]
G --> J["Load authoritative config
on one node"]
H --> J
I --> J
C --> J
F --> JCommon causes
| Cause | What it looks like | First thing to check |
|---|---|---|
| Simultaneous divergent config changes | Two or more peers have different checksums for the same module. Both have high epoch values. diff_check climbs but never resolves. | Check who made admin changes on which proxy and when. |
| version=1 on all peers after rolling restart | Every peer shows version=1 for one or more modules. No peer qualifies as sync source. | SELECT hostname, name, version FROM stats_proxysql_servers_checksums; |
| mysql_servers auxiliary table sync gap | diff_check for mysql_servers climbs indefinitely. Checksums never converge. Galera or Group Replication hostgroup tables differ between peers. | Compare mysql_galera_hostgroups or mysql_group_replication_hostgroups across peers. |
| Network partition between peers | Peers cannot reach each other on the admin port (6032). stats_proxysql_servers_metrics shows connection failures. | Check peer connectivity in proxysql_servers table and network paths. |
| Checksum variables disabled on some peers | Some peers report a zero checksum for a module. Others report real checksums. | SELECT variable_name, variable_value FROM global_variables WHERE variable_name LIKE 'admin-checksum_%'; |
Quick checks
Run these against each peer in the cluster, not just one. The examples use default admin credentials (admin/admin); adjust for your environment.
# 1. View all checksums across all peers for all modules
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "SELECT hostname, port, name, version, epoch, checksum, diff_check FROM stats_proxysql_servers_checksums ORDER BY name, hostname;"
# 2. Find modules where peers disagree (count distinct checksums per module)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "SELECT name, COUNT(DISTINCT checksum) AS distinct_checksums, MAX(diff_check) AS max_diff_check FROM stats_proxysql_servers_checksums GROUP BY name;"
# 3. Check which peers are at version=1 (no sync source available)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "SELECT hostname, port, name, version FROM stats_proxysql_servers_checksums WHERE version = 1;"
# 4. Check cluster check interval and diffs-before-sync settings
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "SELECT variable_name, variable_value FROM global_variables WHERE variable_name LIKE 'admin-cluster_%' ORDER BY variable_name;"
# 5. Verify checksum generation is enabled for each module
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "SELECT variable_name, variable_value FROM global_variables WHERE variable_name LIKE 'admin-checksum_%';"
# 6. Check peer connectivity and sync metrics
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "SELECT * FROM stats_proxysql_servers_metrics;"
# 7. List configured cluster peers
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "SELECT * FROM proxysql_servers;"
How to diagnose it
Identify which modules diverge. Run check 2 above. Any module with
distinct_checksums > 1is divergent. Focus first onmysql_serversandmysql_query_rulesbecause these directly affect routing.Check version values. If all peers show
version=1for a divergent module, no peer qualifies as sync source. This is the rolling restart trap.Check diff_check trends. Steady increment without convergence means sync is attempted but failing. A stable
diff_checkmeans the node stopped trying, likely because no valid source exists or it gave up after repeated failures.Determine which peer has the authoritative config. Compare
runtime_mysql_servers,runtime_mysql_query_rules, andruntime_mysql_usersacross peers. The peer with the correct config should be the sync source. Verify itsversionis greater than 1.Check for the auxiliary table sync gap. If
mysql_serverschecksums never converge, comparemysql_galera_hostgroups,mysql_group_replication_hostgroups, andmysql_replication_hostgroupsacross peers. Themysql_serverschecksum incorporates these auxiliary tables, but sync may not pull all of them.Verify peer connectivity. Check
stats_proxysql_servers_metricsfor connection errors. Verify network paths on the admin port (default 6032).
Metrics and signals to monitor
| Signal | Why it matters | Warning sign |
|---|---|---|
Distinct checksums per module in stats_proxysql_servers_checksums | Direct measure of config divergence across peers | More than 1 distinct checksum for mysql_servers or mysql_query_rules |
diff_check counter per module per peer | Shows whether sync is being attempted and failing | Steady growth without convergence beyond the convergence window |
version per module per peer | Identifies whether a valid sync source exists | All peers at version=1 means no source available |
epoch per module per peer | Shows which peer last changed config; highest epoch is preferred sync source | Two peers with similar high epochs indicates competing changes |
stats_proxysql_servers_metrics | Peer connectivity and sync operation results | Connection failures or sync errors between peers |
| Client-reported inconsistent behavior | Application teams report queries succeeding on one proxy but failing on another | Correlate reports with specific ProxySQL instances behind the load balancer |
Fixes
Fix: simultaneous divergent configs
When different configurations are loaded on multiple proxies, the cluster cannot resolve the conflict automatically. Designate one peer as the source of truth.
On the peer with the correct config, load the divergent module to runtime to bump its epoch:
# Replace MYSQL SERVERS with the module that diverged (MYSQL QUERY RULES, MYSQL USERS, etc.)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "LOAD MYSQL SERVERS TO RUNTIME;"
This increments version and epoch on that peer, making it the preferred sync source. Other peers should pull within admin-cluster_check_interval_ms multiplied by 3. After convergence, persist on all peers:
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "SAVE MYSQL SERVERS TO DISK;"
Only load and save the modules that diverged. Loading unrelated modules unnecessarily bumps their checksums and can mask the real divergence.
Fix: version=1 after rolling restart
When all peers restart in sequence and load config from disk, each resets to version=1. The version guard prevents any from acting as sync source. Pick one peer and load the divergent module to runtime:
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "LOAD MYSQL SERVERS TO RUNTIME;"
This sets version above 1, making the peer a valid sync source.
If the config on disk was stale because changes were loaded to runtime but never saved before restart, the authoritative config is lost. Reconstruct it manually on one peer, load to runtime, then let the cluster sync.
Fix: auxiliary table sync gap
If you use mysql_galera_hostgroups, mysql_group_replication_hostgroups, or mysql_replication_hostgroups, and the mysql_servers checksum never converges, sync may not be pulling all auxiliary tables.
On each divergent peer:
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
-e "LOAD MYSQL SERVERS TO RUNTIME; SAVE MYSQL SERVERS TO DISK;"
If divergence recurs immediately after sync, the auxiliary table contents genuinely differ between peers. Fix the config on the authoritative peer first, then let sync propagate.
Fix: network partition
If peers cannot reach each other, no sync is possible. Check:
- Admin port (default 6032) is reachable between proxy hosts
- Firewall rules allow inter-proxy traffic on the admin port
- Hostnames or IP addresses in
proxysql_serversare correct and resolve from each peer
After restoring connectivity, convergence should happen within admin-cluster_check_interval_ms multiplied by 3.
Prevention
- Make config changes on one peer only. Designate a primary admin peer. Load to runtime and let cluster sync propagate. Never make simultaneous changes on multiple peers.
- Always SAVE TO DISK after loading to runtime. A restart resets
versionto 1 and loads from disk. If disk config is stale, the node comes back with wrong config and version=1. - Monitor
stats_proxysql_servers_checksumscontinuously. Alert on any module with more than 1 distinct checksum sustained beyond the convergence window. - After rolling restarts, verify convergence. Check that at least one peer has
versiongreater than 1 for each module. If all peers are atversion=1, manually load one module on the designated peer. - Audit auxiliary hostgroup tables during planned maintenance. If you use Galera or Group Replication hostgroups, verify these tables are identical across peers.
- **Avoid concurrent admin queries against `stats_proxysql_servers_checksums` on ProxySQL 2.5.5.** This version has a known crash bug triggered by concurrent access with a SQLite constraint violation. Fixed in later releases.
How Netdata helps
- Netdata collects ProxySQL metrics per-second, making divergence visible immediately rather than at a slower polling interval. The
diff_checktrend is the key signal: steady growth without convergence means the cluster cannot self-heal. - Correlate checksum divergence with ProxySQL restart events (via
ProxySQL_Uptimedrops) to distinguish rolling restart traps from genuine config conflicts. Ifversion=1appears on all peers after uptime resets, the cause is restart-related. - When
mysql_serverschecksums diverge, Netdata’s per-backend metrics (connection pool usage, backend status, ConnERR rates) let you confirm which proxy has the correct backend set by comparing operational behavior, not just config tables. - Netdata’s ML anomaly detection can flag unusual
diff_checkpatterns before a human-defined threshold fires, giving early warning that cluster sync is degrading. - For split-brain routing incidents, correlating checksum mismatch timing with client connection patterns (
Client_Connections_connected,Client_Connections_aborted) across proxy instances confirms that clients are experiencing the routing divergence.
Related guides
- ProxySQL error 1045 Access denied for user: credential rotation not propagated
- ProxySQL backend connection pool exhausted: queries queuing for a free connection
- ProxySQL backend flapping between ONLINE and SHUNNED: monitor-induced oscillation
- ProxySQL OFFLINE_SOFT vs OFFLINE_HARD vs SHUNNED: what each backend status means
- ProxySQL backend SHUNNED: why a healthy backend gets pulled out of rotation
- ProxySQL Client_Connections_aborted rising: clients rejected or crashing on connect
- ProxySQL client connections at mysql-max_connections: frontend saturation and rejected clients
- ProxySQL connection storm after restart: an empty pool meeting a mass reconnect
- ProxySQL ConnERR climbing: backend connection errors and how to localise them
- ProxySQL ConnPool_get_conn_failure rising: the most direct pool-starvation signal
- ProxySQL hostgroup_locked connections: reading the multiplexing-health ratio
- How ProxySQL actually works in production: a mental model for operators






