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

5.4k Views Asked by At

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.

enter image description here

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 | +--------------------------+-------+

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

There are 1 best solutions below

0
On
  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.