美文网首页MySQL
使用原生OnlineDDL报错:ERROR 1206 (HY00

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

作者: Better朔 | 来源:发表于2018-06-04 14:35 被阅读122次

    阿里云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 

    相关文章

      网友评论

        本文标题:使用原生OnlineDDL报错:ERROR 1206 (HY00

        本文链接:https://www.haomeiwen.com/subject/eurksftx.html