slave_pending_jobs_size_max

  • 主从数据库复制异常

异常信息:Cannot schedule event Rows_query, relay-log name ./mysql-relay-bin.000081, position 849140440 to Worker thread because its size 16777231 exceeds 16777216 of slave_pending_jobs_size_max

#查看默认是16M
mysql> show global variables like '%slave_pending_jobs_size_max%'; 
+-----------------------------+----------+
| Variable_name               | Value    |
+-----------------------------+----------+
| slave_pending_jobs_size_max | 16777216 |

+-----------------------------+----------+

#32M
stop slave;
set global slave_pending_jobs_size_max=33554432;  
start slave;
show slave status\G;

slave_pending_jobs_size_max的用途:在多线程复制时,在队列中Pending的事件所占用的最大内存,默认为16M,如果内存富余,或者延迟较大时,可以适当调大;注意这个值要比主库的max_allowed_packet大

你可能感兴趣的:(MySQL)