最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

ERROR1205(HY000):Lockwaittimeoutexceeded;tryrestarti

来源:动视网 责编:小采 时间:2020-11-09 12:39:23
文档

ERROR1205(HY000):Lockwaittimeoutexceeded;tryrestarti

ERROR1205(HY000):Lockwaittimeoutexceeded;tryrestarti:ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction 前言:朋友咨询我说执行简单的update语句失效,症状如下:mysql> update order_info set province_id=15 ,city_id= 1667 wh
推荐度:
导读ERROR1205(HY000):Lockwaittimeoutexceeded;tryrestarti:ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction 前言:朋友咨询我说执行简单的update语句失效,症状如下:mysql> update order_info set province_id=15 ,city_id= 1667 wh


ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction

前言:朋友咨询我说执行简单的update语句失效,症状如下:
mysql> update order_info set province_id=15 ,city_id= 1667 where order_from=10 and order_out_sn='1407261241xxxx';
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
mysql>

QQ远程过去,开始check
1,查看数据库的隔离级别:

mysql> select @@tx_isolation;
+-----------------+
| @@tx_isolation |
+-----------------+
| REPEATABLE-READ |
+-----------------+
1 row in set (0.00 sec)

mysql>


2,去查看先当前库的线程情况:

mysql> show full processlist;

+----------+-----------------+-------------------+-----------------+-------------+---------+-------------------------+-----------------------+

| Id | User | Host | db | Command | Time | State | Info |

+----------+-----------------+-------------------+-----------------+-------------+---------+-------------------------+-----------------------+

| 1 | event_scheduler | localhost | NULL | Daemon | 9635385 | Waiting on empty queue | NULL |

| 9945825 | business_web | 192.168.1.25:49518 | business_db | Sleep | 43 | | NULL |

| 9946322 | business_web | 192.168.1.23:44721 | business_db | Sleep | 153 | | NULL |

| 9960167 | business_web | 192.168.3.28:2409 | business_db | Sleep | 93 | | NULL |

| 99484 | business_web | 192.168.1.21:24280 | business_db | Sleep | 7 | | NULL |

| 9972499 | business_web | 192.168.3.28:35752 | business_db | Sleep | 13 | | NULL |

| 10000117 | business_web | 192.168.3.28:9149 | business_db | Sleep | 6 | | NULL |

| 10002523 | business_web | 192.168.3.29:42872 | business_db | Sleep | 6 | | NULL |

| 10007545 | business_web | 192.168.1.21:51379 | business_db | Sleep | 155 | | NULL |
......

+----------+-----------------+-------------------+-----------------+-------------+---------+-------------------------+-----------------------+

mysql> SELECT * FROM information_schema.INNODB_TRX\G;

*************************** 1. row ***************************

trx_id: 20866

trx_state: LOCK WAIT

trx_started: 2014-07-31 10:42:35

trx_requested_lock_id: 20866:617:3:3

trx_wait_started: 2014-07-30 10:42:35

trx_weight: 2

trx_mysql_thread_id: 9930577

trx_query: delete from dltask where id=1

trx_operation_state: starting index read

trx_tables_in_use: 1

trx_tables_locked: 1

trx_lock_structs: 2

trx_lock_memory_bytes: 376

trx_rows_locked: 1

trx_rows_modified: 0

trx_concurrency_tickets: 0

trx_isolation_level: READ COMMITTED

trx_unique_checks: 1

trx_foreign_key_checks: 1

trx_last_foreign_key_error: NULL

trx_adaptive_hash_latched: 0

trx_adaptive_hash_timeout: 10000

trx_is_read_only: 0

trx_autocommit_non_locking: 0

3,看到有这条9930577的sql,,kill掉,执行kill 9930577;

mysql> kill 9930577;

Query OK, 0 rows affected (0.00 sec)

mysql>

mysql> SELECT * FROM INNODB_TRX\G;

Empty set (0.00 sec)

ERROR:

No query specified

mysql>

mysql> update order_info set province_id=15 ,city_id= 1667 where order_from=10 and order_out_sn='1407261241xxxx';

Query OK, 1 row affected (0.00 sec)

Rows matched: 1 Changed: 1 Warnings: 0


本文永久更新链接地址:

文档

ERROR1205(HY000):Lockwaittimeoutexceeded;tryrestarti

ERROR1205(HY000):Lockwaittimeoutexceeded;tryrestarti:ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction 前言:朋友咨询我说执行简单的update语句失效,症状如下:mysql> update order_info set province_id=15 ,city_id= 1667 wh
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top