简体   繁体   中英

Magento SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction

I recently made a copy of my large 32Gig Database to use for my development environment. Now getting this error when I try to create, delete, update items.

SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction

I'm thinking maybe the copy didnt go correctly and some of the tables are locked?

The Database in question is test_dev2 which in use by my dev environment. I tried killing the process for test_dev2 and still same error.

在此处输入图片说明

I also restarted the MySQL service and still same error.

I then increased innodb_lock_wait_timeout to 120 +--------------------------+-------+ | Variable_name | Value | +--------------------------+-------+ | innodb_lock_wait_timeout | 120 | +--------------------------+-------+ +--------------------------+-------+ | Variable_name | Value | +--------------------------+-------+ | innodb_lock_wait_timeout | 120 | +--------------------------+-------+

Heres what I get when I run this command SHOW OPEN TABLES WHERE In_use > 0; +-----------+------------------+--------+-------------+ | Database | Table | In_use | Name_locked | +-----------+------------------+--------+-------------+ | test_dev2 | core_url_rewrite | 1 | 0 | +-----------+------------------+--------+-------------+

Any Ideas on how I could fix this 1205 Lock wait timeout exceeded error?

  1. Ask your system Admin if server where you have installed this version has the capability to handle this big DB.

  2. Slim the DB by removing/reducing entries entries --Remove customers entry, logs entry, quote etc.

  3. Make sure indexing is properly done.

  4. Your Mysql buffer memory size setting too might result in temporary table creation which inturn will slow down execution which in turn will result in time out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM