You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.
I'm also seeing a few of the following deadlocks when claiming actions (on a site with 8 concurrent queues processing):
WordPress database error Deadlock found when trying to get lock; try restarting transaction for query
UPDATE `wp_qftw_actionscheduler_actions` SET `claim_id` = 0 WHERE `claim_id` = 29497
made by
include('phar:///usr/local/bin/wp/php/boot-phar.php'),
include('phar:///usr/local/bin/wp/php/wp-cli.php'),
WP_CLI\bootstrap,
WP_CLI\Bootstrap\LaunchRunner->process,
WP_CLI\Runner->start,
WP_CLI\Runner->_run_command_and_exit,
WP_CLI\Runner->run_command,
WP_CLI\Dispatcher\Subcommand->invoke,
call_user_func,
WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure},
call_user_func,
ActionScheduler_WPCLI_Scheduler_command->run,
ActionScheduler_WPCLI_QueueRunner->run,
Action_Scheduler\Custom_Tables\DB_Store->release_claim
@rrennick I think that's probably the best we can do. Sleep + retry won't reduce the likelihood of it happening much, because it's equally likely there will be multiple queues happening later, so the deadlock may occur again on a 2nd attempt. We could mitigate that by retrying a number of times, like up to 10, but that all starts to feel very hacky...
I'm not sure how (if) we can optimize the query or schema to prevent it completely though either, so try/catch, usleep & retry might be the best we can do.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
While running 3 queues of scheduled actions (with a small batch size of 5 actions) via WP CLI, I enountered the following deadlock:
Screenshot: https://cl.ly/262n1x3m1E3Z
The text was updated successfully, but these errors were encountered: