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?
Some other process is locking catalog_category_entity table. Are you sure you are the only one updating categories? Could there be another process or a cron job working with categories?