mysql 1205 lock wait timeout exceeded
2015-08-15 17:08
585 查看
最近网站经常报锁表的错误,系统用的是magento,innodb表,在事物在更新或插入后没有执行commit操作,并且超过了设置的最大等待时间(默认innodb_lock_wait_timeout=50),一旦超过就会报mysql 1205 lock wait timeout exceeded
在网上找了很多,解决的方案很少,大都都是show processlist,然后kill进程,但是这治标不治本
最后在google上看到有2中解决方案
1) either contact your hosting provided and ask to increase the time out :
[mysqld]
innodb_lock_wait_timeout=120
2) or you can try below trick buy running query in phpmyadmin :
create index core_session_index on core_session (session_id);
create index core_session_index_date on core_session (session_expires);
目前我先改了innodb锁表超时时间,观察一段时间有没有错误发生
在网上找了很多,解决的方案很少,大都都是show processlist,然后kill进程,但是这治标不治本
最后在google上看到有2中解决方案
1) either contact your hosting provided and ask to increase the time out :
[mysqld]
innodb_lock_wait_timeout=120
2) or you can try below trick buy running query in phpmyadmin :
create index core_session_index on core_session (session_id);
create index core_session_index_date on core_session (session_expires);
目前我先改了innodb锁表超时时间,观察一段时间有没有错误发生
相关文章推荐
- Mysql蠕虫复制
- MySql修改密码
- 数据库基础学习之-MySql服务名无效
- 数据库基础学习之-初识MySql
- hibernate mysql映射类型
- mysql存储过程和函数,事件调度器
- 【MySQL集群】——在Windows环境下配置MySQL集群
- mysql入门总结
- 改wampServer的MySQL默认字符集
- mysql开发遇到的问题之1064错误代码
- mysql分表实战
- MySQL主从设置
- Mysql创建表格
- MySql中一些常用的命令
- mysql 504 timeout问题
- MYSQL 存储过程的事务
- mysql中设置最大连接数max_connections
- Mysql双主复制
- mysql timestamp格式
- MySQL常用技巧