[root@localhost ~]# /opt/mysql/bin/mysql -uroot -p'123123' -e 'SHOW SLAVE STATUS \G' | egrep "Master_Log_Pos"
           Read_Master_Log_Pos: 478353559
           Exec_Master_Log_Pos: 452076624

 

         Seconds_Behind_Master: 3971

 

위와같이 싱크가 잘 안맞는다.

 

bin 로그 확인시 지연될만한 쿼리가 아니고 개발자에게 문의해봐도 따로 쿼리 업데이트가 된건 없다고 한다.

 

iostat 
Linux 2.6.32-754.17.1.el6.x86_64 ()       08/05/2019      _x86_64_        (24 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           6.77    0.00    0.55    3.28    0.00   89.40

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               1.04         7.48        24.84    3539870   11757640
sdb               2.26         0.15      2158.02      70244 1021591088
sdc               0.00         0.01         0.00       6378          8
sdd             694.72      2571.53     18588.32 1217341239 8799565808

(sdd 디스크가 mysql data 디렉토리)

 

디스크 i/o가 높긴한데... 예전부터 높았다. 디스크 문제도 아닌것으로 보이고..

 

커널업데이트 한 이후부터 싱크가 안맞고 있음

 

i/o 스케쥴링이 cfg 로 설정돼있는 상태여서 noop(ssd 디스크임)으로 변경해봤으나 큰 차이가 없음

 

commitinnodb_flush_log_at_trx_commit = 2 으로 설정(기본 1)
https://santander.co.kr/151 참고

 

         Seconds_Behind_Master: 0

 

우선 조치완료.. 했으나 개운치않다. 추가 점검할 예정

 

우선 구글에다가 ansible awx 설치 하면 거의 99프로는 https://github.com/ansible/awx.git 요거 설치하는게 나온다.

저걸로 설치하면 에러가 발생한다. 아래처럼..

 

TASK [local_docker : Start the containers] *********************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import docker or docker-py - cannot import name __version__. Try `pip install docker` or `pip install docker-py` (Python 2.6)"}

 

이런 에러가 난다.

 

구글링 해보면 많이 나온다. 뭐 pip install docker 해보고 언인스톨 했다가 yum 으로 다시 설치 해보고 compose 버전 지정해서 설치 해보고.... 계속 에러가 난다.

 

ansible 에러가 아니고 docker 컨테이너 실행이 안되는거니까.. 하나하나 찾아보면

 

우선.. 에러나는 task가 

- name: Start the containers
  docker_service:
    project_src: "{{ docker_compose_dir }}"
    restarted: "{{ awx_compose_config is changed or awx_secret_key is changed }}"
  register: awx_compose_start

 

위 부분이다. 

 

docker_service 라는 모듈은 말 그대로 docker 서비스, 컨테이너를 관리하는 모듈인데 뭐 최신버전(ansible 2.8)은 docker_service라는 모듈 대신에 docker_compose를 사용하라고 한다. 

(https://docs.ansible.com/ansible/latest/modules/docker_service_module.html 참고)

하... 설치 잘된다..

 

이렇게 쉬운거였다니 ;;;;;; 어이가 없네 진자............ 역시 구글링 백날 해봐야 공식 docs 가 최고인것같다.

'job > ansible' 카테고리의 다른 글

ansible - windows Win32ErrorCode 1058  (0) 2019.05.23
windows host에서 ansible 실행하는법  (0) 2019.05.23
ansible 공부한 모듈들 정리  (0) 2019.05.02
ansible - 디렉토리 구조  (0) 2019.05.02
ansible- error  (0) 2019.04.26

190329 19:47:38  InnoDB: ERROR: the age of the last checkpoint is 13637149,
InnoDB: which exceeds the log group capacity 9433498.
InnoDB: If you are using big BLOB or TEXT rows, you must set the
InnoDB: combined size of log files at least 10 times bigger than the
InnoDB: largest such row.

 

 

참고

https://dba.stackexchange.com/questions/16510/mysql-innodb-innodb-error-the-age-of-the-last-checkpoint-is-innodb-which-exc

 

 

 

 

iib_logfiib_logfile 0이랑 1 mv로 옮겨두고 

innodb_log_file_size = 52428800  (my.cnf에는 아무 설정 안돼있고 디폴트는 5242880 인데 0 하나 더 줌)

 

그리고 mysql 재시작

+ Recent posts