MySQL

使用原生OnlineDDL报错:ERROR 1206 (HY00

2018-06-04  本文已影响122人  Better朔

阿里云RDS MySQL5.6在使用原生OnlineDDL进行结构变更时报错:

ERROR 1206 (HY000): The total number of locks exceeds the lock table size,

在错误日志中:

=====================================

InnoDB: WARNING: over 67 percent of the buffer pool is occupied by

lock heaps or the adaptive hash index! Check that your

transactions do not set too many row locks.

Your buffer pool size is 64 MB. Maybe you should make the buffer pool bigger?

Starting the InnoDB Monitor to print diagnostics, including lock heap and hash index sizes.

......

查看当前的配置:max_write_lock_count =102400

发现这个参数配置得太小了,但是阿里云默认权限不允许大于102400,所以采用pt-online-schema-change进行

若为自建的MySQL Server,可以配置:

    set global max_write_lock_count =18446744073709551615

在MySQL官方文档中,对于该参数的说明:

max_write_lock_count 
上一篇下一篇

猜你喜欢

热点阅读