AWS Aurora MySQL 환경
Engine Version : 5.7.mysql_aurora.2.09.1
Instance Class : Master - db.r5.xlarge (Reader, Writer 2 Instance) / Slave - db.r5.large (Writer 1 Instance)
* Master 와 Slave 간 Cross-Region Replication 으로 DR 을 구축하여, 일반적인 DR 구성이 아닌 다른 Region 에 복제 DB 를 한 개 추가했다고 보면 된다.
AWS Aurora MySQL Error 이슈 및 조치 사항
- Master DB 의 Error Log 에 아래의 zomebie dump thread 에 대한 KILL 메시지 발생
[Note] While initializing dump thread for slave with UUID <339d7cc6-d325-3f11-9fce-19a1abe1e834>, found a zombie dump thread with the same UUID. Master is killing the zombie dump thread.
- Slave DB 의 Error Log 에 slave SQL thread 가 KILL 처리 되면서 동기화 끊김
[Warning] Storing MySQL user name or password information in the master info repository is not secyre and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[Note] Slave SQL thread for channel '' initialized, starting replication in log 'mysql-bin-changelog.000003' at position 117052709, relay log '/rdsdbdata/log/relaylog/relaylog.000426' position: 273
[Note] Error reading replay log event for channel '': slave SQL thread was killed
[Error] Slave I/O for channel '': error connecting to master 'rdsrepladmin@192.26.15.0:3306' - retry-time: 60 retries: 1, Error_code:2013
[Note] Slave I/O thread for channel '' killed while connecting to master
[Note] Slave I/O thread exiting for channel '', read up to log 'mysql-bin-changelog.000003', position 117052709
1. Master DB 선조치
Master DB 재기동(reboot) : 재기동 후 Slave DB 와 다시 Connection 활성화됨
2. Master DB 의 aurora_dump_thread_metrics_log_interval_seconds 파라미터 값 변경
히든 파라미터로 AWS RDS 파라미터 그룹의 파라미터 설정으로 변경할 수 없으며 AWS 에 Case Open 하여 히든 파라미터 값을 1분(3600)에서 10분(36000)으로 변경 요청을 해야함
aurora_dump_thread_metrics_log_interval_seconds
AS-IS : 3600 → TO-BE : 36000
SET GLOBAL aurora_dump_thread_metrics_log_interval_seconds = 36000
* 위의 파라메터 설정값은 AWS Case Open 하여 internal 팀에서 가이드 받아 해결된 사항임
AWS Aurora MySQL Error 원인
5.7.mysql_aurora.2.10.2 버전에서는 Bug Fixed 되었으며, Master DB 와 Slave DB 간 binlog dump thread 관련 hearbeat 체크 간격(1분)이 너무 짧아 해당 프로세스를 좀비 프로세스로 인식하여 MySQL 에서 프로세스를 KILL 시키는 현상이 발생.
댓글