0

I tried looking up for this kind of issue, but did not find anything, hence posting this question.

I have a MySQL master-slave replication (Row Format) setup, we had some issues on the slave node, so it was down for quiet a while. Hence we took a fresh dump and restored. Now below is my show slave status \G

mysql> show slave status\G
    *************************** 1. row ***************************
                   Slave_IO_State: Waiting for master to send event
                      Master_Host: lcroptest001
                      Master_User: replication
                      Master_Port: 3306
                    Connect_Retry: 60
                  Master_Log_File: mysql-bin.000948
              Read_Master_Log_Pos: 639644442
                   Relay_Log_File: relay-bin.000004
                    Relay_Log_Pos: 417972580
            Relay_Master_Log_File: mysql-bin.000948
                 Slave_IO_Running: Yes
                Slave_SQL_Running: Yes
                  Replicate_Do_DB:
              Replicate_Ignore_DB:
               Replicate_Do_Table:
           Replicate_Ignore_Table:
          Replicate_Wild_Do_Table:   
      Replicate_Wild_Ignore_Table:
                       Last_Errno: 0
                       Last_Error:
                     Skip_Counter: 0
              Exec_Master_Log_Pos: 417972417
                  Relay_Log_Space: 639646199
                  Until_Condition: None
                   Until_Log_File:
                    Until_Log_Pos: 0
               Master_SSL_Allowed: No
               Master_SSL_CA_File:
               Master_SSL_CA_Path:
                  Master_SSL_Cert:
                Master_SSL_Cipher:
                   Master_SSL_Key:
            Seconds_Behind_Master: 9646 
    Master_SSL_Verify_Server_Cert: No
                    Last_IO_Errno: 0
                    Last_IO_Error:
                   Last_SQL_Errno: 0
                   Last_SQL_Error:   
      Replicate_Ignore_Server_Ids:
                 Master_Server_Id: 3
                      Master_UUID: 8888-9675466-65537-0099
                 Master_Info_File: /data/mysql/master.info
                        SQL_Delay: 0
              SQL_Remaining_Delay: NULL
          Slave_SQL_Running_State: Reading event from the relay log
               Master_Retry_Count: 86400
                      Master_Bind:
          Last_IO_Error_Timestamp:
         Last_SQL_Error_Timestamp:
                   Master_SSL_Crl:
               Master_SSL_Crlpath:
               Retrieved_Gtid_Set:
                Executed_Gtid_Set:
                    Auto_Position: 0 
1 row in set (0.00 sec)

SECONDS BEHIND MASTER comes down to around 9400 approx and again raises up and comes down back to that value and again increases.

Additional Info:

mysql> show processlist;
+--------+-------------+-----------+------+---------+------+----------------------------------+------------------+
| Id     | User        | Host      | db   | Command | Time | State                            | Info             |
+--------+-------------+-----------+------+---------+------+----------------------------------+------------------+
| 276401 | root        | localhost | NULL | Query   |    0 | init                             | show processlist |
| 276606 | system user |           | NULL | Connect |   37 | Waiting for master to send event | NULL             |
| 276607 | system user |           | NULL | Connect | 9652 | Reading event from the relay log | NULL             |
+--------+-------------+-----------+------+---------+------+----------------------------------+------------------+
3 rows in set (0.00 sec)

mysql> show variables like "%slave_parallel_workers%";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| slave_parallel_workers | 0     |
+------------------------+-------+
1 row in set (0.00 sec)

i tried changing the value to 4, but ran into Slave_SQL_Running_State: Waiting for Slave Worker to release partition and found that this might be a bug hence changed the value back to 0.

mysql> show variables like "%innodb_flush_log_at_trx_commit%";
+--------------------------------+-------+
| Variable_name                  | Value |
+--------------------------------+-------+
| innodb_flush_log_at_trx_commit | 1     |
+--------------------------------+-------+
1 row in set (0.00 sec)

I tried changing this value to 0 and 2 but still the same issue.

I am on MySQL 5.6.40 my machine is 4 CPU and 23 GB but CPU and memory usage is very low. Did not see any Network issues as well.

FYI - The value of Exec_Master_Log_Pos changes very rarely but Relay_Log_Space value keeps increasing every time i do show slave status\G

Please let me know if i am missing anything here.

  • I noticed that when ever Exec_Master_Log_Pos changes the seconds behind master is coming down, and later the SMB keeps increasing until the Exec_Master_Log_Pos changes. This keeps repeating. – Rabbit Nov 25 '19 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.