Troubleshooting High Availability
Troubleshoot the issues you find with high availability.
Checking for Failover
In the event of failure of the primary, one of the secondaries is automatically promoted to primary, is set to read-write mode, and resumes availability to client applications with no data loss.
Using a Command-Line Client
Use a command-line client such as MySQL Client or MySQL Shell to check if a failover has occurred.
Run the following
command:
SELECT * FROM performance_schema.error_log WHERE PRIO IN ('System');
If a failover has occurred, you get a repsonse similar to the
following:
| date&time |35 | System | MY-013214 | Repl| Plugin group_replication reported:
'Starting group operation local execution: Primary election change' |
| date&time |0| System | MY-011507 | Repl | Plugin group_replication reported:
'A new primary with address UUIDOfPromotedSecondary:3306 was elected.
The new primary will execute all previous group transactions before
allowing writes. Enabling conflict detection until the new primary applies
all relay logs.' |
| date&time |37| System | MY-011566 | Repl | Plugin group_replication reported: |
| date&time |37| System | MY-011510 | Repl | Plugin group_replication reported:
'This server is working as primary member.' |
| date&time |0| System | MY-013213 | Repl | Plugin group_replication reported:
'Configuration operation 'Primary election change' terminated. Primary server
switched to: UUIDOfPromotedSecondary'
Resolving Transaction Size Errors
Resolve transaction size errors such as MY-011608
or
ERROR 3100 (HY000)
.
This task assumes you have encountered a transaction size-related error
on a high availability DB system:
[ERROR] [MY-011608] [Repl] Plugin group_replication reported: 'Error on session 423. Transaction of size 90386497 exceeds specified limit 85899345. To increase the limit please adjust group_replication_transaction_size_limit option.'
ERROR 3100 (HY000): Error on observer while running replication hook 'before_commit'.
Do one of the following to resolve these errors:
- Reduce your transaction size. See group_replication_transaction_size_limit.
- Use a parallel loading method.
- Create a DB system using a shape that better suits your needs. See Creating a DB System.