Databases
Environment
Environment
MySQL 8 primary with one asynchronous replica and a nightly CSV import job.
What happens
What happens
Replica delay reaches forty minutes although CPU and network remain moderate.
What I have tried
What I have tried
Increased replica parallel workers and moved the import outside peak traffic.
I would appreciate advice on how to identify the root cause without risking existing data or configuration.
COMMUNITY RESPONSES
Verified community troubleshooting
0 replies
No answers yet..
Showing 0 of 0 community responses
AI DIAGNOSTICS
Incident analysis
Most likely causes
Large transactions serialize replication and retain locks until the entire batch commits. 86%
A recent software, firmware or configuration change is exposing an existing compatibility issue. 40%
Summary
The reported behaviour is consistent with large transactions serialize replication and retain locks until the entire batch commits. The safest next step is to verify that hypothesis with a reversible test before making permanent configuration changes.
Suggested Fixes
Verify the likely cause
Import in smaller committed batches, preserve primary-key order and inspect replication worker utilization before adding more threads.
Validate and monitor
Reproduce the issue once after the change, review relevant logs or metrics, and keep a rollback path until the system has remained stable.
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Databases27% match
MySQL replica SQL thread stalls with 'Waiting for table metadata lock' after direct ALTER TABLE on primary during peak writes
Open0 answers - Databases21% match
MySQL replica stops with GTID mismatch after skipping a transaction during a network outage
Open0 answers - Databases21% match
MySQL replica SQL thread idles and relay logs grow after short network blips — slave lags and no obvious errors
Open0 answers