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

Source: Internet
Author: User
Today's big tell me a MySQL mass update reported the following error "MySQL error code 1206 (er_lock_table_full): The total number of locks exceeds the LOCK TABLE Size
Start Troubleshooting:
First, look at the Max_write_lock_count
Mysql> show global variables like ' max_write_lock_count ';
+----------------------+----------------------+
| variable_name | Value |
+----------------------+----------------------+
| Max_write_lock_count | 18446744073709551615 |
+----------------------+----------------------+
1 row in Set (0.00 sec)
This value is 18446744073709551615 large enough to be the main cause of the error.
Second, view Innodb_buffer_poll_size
Mysql> show global variables like ' innodb_buffer% ';
+-------------------------+---------+
| variable_name | Value |
+-------------------------+---------+
| Innodb_buffer_pool_size | 8388608 |
+-------------------------+---------+
1 row in Set (0.00 sec)
Innodb_buffer_pool_size default Size, 8M


The development environment parameter is adjusted to 2G
#vi/etc/my.cnf
[Mysqld]
innodb_buffer_pool_size=2g

Restart the database to solve the problem

Summary of the cause of the problem:

The

InnoDB calls innodb_buffer_pool_size space to process data when a DDL operation that performs mass data on a table is executed, and the value is too small to be an error.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.