1

When I try to save category from admin panel it showing error like something went wrong and when I checked the exception log it showing me below error.

main.CRITICAL: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: UPDATE catalog_category_entity SET children_count = children_count+1 WHERE (entity_id IN('1', '2', '1355')) {"exception":"[object] (Magento\Framework\DB\Adapter\LockWaitException(code: 1205): SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: UPDATE catalog_category_entity SET children_count = children_count+1 WHERE (entity_id IN('1', '2', '1355')) at /public/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:555, Zend_Db_Statement_Exception(code: 0): SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: UPDATE catalog_category_entity SET children_count = children_count+1 WHERE (entity_id IN('1', '2', '1355')) at /public/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction at /public/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []

Please let me know if you have face same above issue like this.

What are the necessary steps to fix the above issue?

Please check the process enter image description here

Your help and answers are appreciated!

Thanks in advance!

  • php version ????? – Rk Rathod Sep 20 at 6:49
0

Please check if there is already some process running and that is holding the table catalog_category_entity. you can do so by running show processlist from mysql console. If yes then you need to wait for that process to complete or kill that process if that is some unwanted script. If no then you can try increasing the wait timeout for mysql

  • Hi @Arif, I have checked there is no other process are showing, please check my question I have just updated with the image – Surbhi Doshi Sep 19 at 11:07
  • Please see this thread https://stackoverflow.com/questions/5836623/getting-lock-wait-timeout-exceeded-try-restarting-transaction-even-though-im for help on mysql connection timeout. Most likely the table is in locked state and it needs to be released. you can also try restarting mysql – Arif Ahmad Sep 20 at 10:20
0

In Database Execute This Query

SET GLOBAL innodb_lock_wait_timeout = 120;
  • Hi @Rk Rathod, I tried with it but not working – Rajan Soni Sep 23 at 5:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.