Replication errors

Errors

  1. Failed to connect to replica at the endpoint . For more details, visit: memgr.ph/replication.
  2. Couldn’t replicate data to . For more details, visit: memgr.ph/replication.
  3. Write query forbidden on the replica!
  4. Query forbidden on the replica!
  5. Replication clause not allowed in multicommand transactions.
  6. Failed to replicate to SYNC/STRICT_SYNC replica ‘replica_name’: reason.

Warning

  1. Snapshots are disabled for replicas. For more details, visit: memgr.ph/replication.
  2. Multi-tenant replication is currently not supported!

Troubleshooting replication errors

  1. Make sure that the Memgraph instances serving as replicas are up and running.
  2. Check the firewall on your machine because it could be blocking the traffic requested by Memgraph.
  3. Verify that there are no network problems.

Query disabled on replica

Not all queries are supported on the replica. Any query that changes data or system setup is prohibited on the replica. MAIN is the only source of truth.

Query not allowed on multicommand transaction

System queries cannot be executed inside a multicommand/explicit transaction.

Replication failure error

When a transaction fails to replicate to one or more SYNC or STRICT_SYNC replicas, Memgraph returns an error that identifies exactly which replicas failed and why. The error message follows this format:

Failed to replicate to SYNC replica 'instance_1': <reason>.
Replica will be recovered automatically.
Transaction is still committed on the main instance and other alive replicas.

When multiple replicas fail, each failure is listed with its replica name, replication mode, and specific reason:

Failed to replicate to SYNC replicas 'instance_1' and 'instance_2': <reason>.
Replicas will be recovered automatically.
Transaction is still committed on the main instance and other alive replicas.

The possible failure reasons are:

ReasonDescription
replica is not reachable or not in sync with the mainThe replica is down, behind, or the connection could not be established.
failed to obtain RPC lock (another transaction is in progress)Another replication transaction is already in progress on that replica.
RPC communication errorA generic error occurred during the RPC call.
replica has diverged from mainThe replica’s data has diverged and manual recovery may be needed.
RPC timeout while replicatingThe MAIN timed out waiting for a response from the replica.

The error message also indicates the transaction outcome:

  • “Transaction is still committed on the main instance and other alive replicas.” — This appears for SYNC replicas. The transaction succeeded on MAIN despite the replica failure.
  • “Transaction was aborted on all instances.” — This appears for STRICT_SYNC replicas. The two-phase commit protocol ensures that if any STRICT_SYNC replica fails, the transaction is rolled back everywhere.

Failed replicas will be recovered automatically. Check the status of replicas using the SHOW REPLICAS query.

If the failure reason is an RPC timeout, the error message includes additional guidance about adjusting the deltas_batch_progress_size coordinator setting.

Snapshots are disabled for replicas

Because of consistency constraints, snapshots are disabled on replicas. If you need a snapshot of the database, then create one on the main instance.