0

When I try to save a category I am getting cloudflare timeout error and the category is not getting saved. When I checked the exception log I found this error : SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: UPDATE catalog_category_entity SET attribute_set_id = ?, parent_id = ?, created_at = ?, updated_at = ?, path = ?, position = ?, level = ?, children_count = ? WHERE (entity_id = '1337'). When I restart the mysql service and refresh the same page the category gets saved. How to fix this?

1 Answer 1

0

To change time in my.cnf

innodb_lock_wait_timeout = 7200

Next thing you have to check Bellow: The reason behind this issue is that you are running a lot of custom scripts and killing the scripts before the database connection gets a chance to close.

If you can login to MySQL from CLI and run the following command

SHOW PROCESSLIST;

you will see the following output

enter image description here

You can see an above example 162 the command is sleep and time is 3850. This is preventing other operations.

These sleep command processes should be killed 1 by 1 using the command as follows.

KILL 162;

Once you have killed all the sleep connections, things should start working as normal again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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