今天进行MySql 一个表数据的清理,经过漫长等待后出现 The total number of locks exceeds the lock table size 提示。以为是table_cache的值设置小了,于是将其值修改变大, 重启 MySQL 服务,再次执行表的清理操作,经过漫长时间等待后,同样的问题再次出现。网上google搜索相关问题,发现这么一段:

If you’re working with a large InnoDB table and you’re updating, inserting, or deleting a large volume of rows, you may stumble upon this error:

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

InnoDB stores its lock tables in the main buffer pool. This means that the number of locks you can have at the same time is limited by the innodb_buffer_pool_size variable that was set when MySQL was started. By default, MySQL leaves this at 8MB, which is pretty useless if you’re doing anything with InnoDB on your server.

原来是InnoDB表执行大批量数据的更新,插入,删除操作时会出现这个问题,需要调整InnoDB全局的innodb_buffer_pool_size的值来解决这个问题。
于是对照者检查了一下我的表类型,发现果然是InnoDB类型的,于是按照提示,修改 innodb_buffer_pool_size 的值,再一次重启mysql服务器,执行表清理操作,经过漫长时间等待后,终于成功执行完毕。

有无办法不用重启MySQL服务器做清理呢?
按照那篇文章介绍,可以将清理的操作分为几段,每次清理一部分(比如清理5-10%的数据),使每次的清理不会超出lock table size 的限制,这样就可以在不重新启动MySQL的情况下完成数据清理。

转自:http://www.sunnyu.com/?p=227

MYSQL 遭遇 THE TOTAL NUMBER OF LOCKS EXCEEDS THE LOCK TABLE SIZE的更多相关文章

  1. mysql:The total number of locks exceeds the lock table size

    使用mysql InnoDB存储引擎进行大量数据的更新,删除的时候容易引发”The total number of locks exceeds the lock table size”问题,解决方法之 ...

  2. MYSQL碰到The total number of locks exceeds the lock table size 问题解决记录

    解决记录如下: 在mysql里面进行修改操作时提示:The total number of locks exceeds the lock table size ,通过百度搜到innodb_buffer ...

  3. 【转】Mysql解决The total number of locks exceeds the lock table size错误

    InnoDB表执行大批量数据的更新,插入,删除操作时会出现这个问题,需要调整InnoDB全局的innodb_buffer_pool_size的值来解决这个问题,并且重启mysql服务. windows ...

  4. mysql出现The total number of locks exceeds the lock table size解决办法

    mysql命令行下查看show variables like 'innodb_buffer_pool_size'; 修改innodb_buffer_pool_size值: windows下面 my.i ...

  5. MySQL配置文件路径及‘The total number of locks exceeds the lock table size’问题

    在删除mysql中的数据时,遇到报错: ERROR 1206 (HY000): The total number of locks exceeds the lock table size 查了查,发现 ...

  6. mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法

    1. 问题背景         InnoDB是新版MySQL(v5.5及以后)默认的存储引擎,之前版本的默认引擎为MyISAM,因此,低于5.5版本的mysql配置文件.my.cnf中,关于InnoD ...

  7. MySQL解决[Err] 1206 - The total number of locks exceeds the lock table size问题

    MySQL解决[Err] 1206 - The total number of locks exceeds the lock table size问题 查看MySQL版本:mysql>show ...

  8. mysql 数据库缓存调优之解决The total number of locks exceeds the lock table size错误

    环境: mysql5.6.2  主从同步(备注:需操作主库和从库) 一.InnoDB表执行大批量数据的更新,插入,删除操作时会出现这个问题,需要调整InnoDB全局的innodb_buffer_poo ...

  9. 【MySQL笔记】mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法

    step1:查看 1.1 Mysql命令行里输入"show engines:"查看innoddb数据引擎状态, 1.2 show variables "%_buffer% ...

随机推荐

  1. hdu 1890 Robotic Sort

    原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1890 如下: #include<cstdio> #include<cstdlib&g ...

  2. 如何从官网下载springframework和document

    spring官网 http://spring.io/ --->spring project--->点击github图标 --->artifactory --->进入到了http ...

  3. 骇客(Hacker)用语

                     什么是TCP/IP 是一种网络通信协议,他规范了网络上所有的通信设备,尤其是一个主机与另一个主机之间的数据往来格式以及传送方式.,TCP/IP是INTERNET的基础 ...

  4. “我爱淘”冲刺阶段Scrum站立会议4

    完成任务: 完成了搜索界面的Activity的编写. 计划任务: 实现数据库的链接,用户可以查到自己需要的书籍的信息. 遇到问题: 数据库的操作,实现查询功能:

  5. C#如何设置Listview的行高-高度

    Winform窗口中,控件listview是无法设置行高的. 以加入一个imagelist(图片列表控件)实现行高的设置. ImageList imageList = new ImageList(); ...

  6. linux 负载 待读

    相关文章: 理解 Linux 的处理器负载均值(翻译)

  7. Netsharp快速入门(之7) 基础档案(工作区1 向导创建工作区)

    作者:秋时 杨昶   时间:2014-02-15  转载须说明出处 3.5     商品开发 3.5.1  创建部件工作区 3.5.1.1 工作区向导 1.打开平台工具,选择界面管理节点下的部件工作区 ...

  8. Alt.js的入门

    一.什么是Alt altJS是基于Flux使用Javascript应用来管理数据的类库,它简化了flux的store.actions.dispatcher. 关于Flux,以下链接都做了很好的诠释 h ...

  9. Python编码设置

    系统编码顺序: 1, a.encode(sys.stdout.encoding) 2, a.encode(default_string) sys.stdout.encoding里的值可以用环境变量PY ...

  10. VSS

    A deleted file of the same name already exists in this VSS project. Do you want to recover the delet ...