Deadlock error on ActionScheduler actions table
-
Hello,
I am seeing many php fatal errors logged that seem derived from wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
The wp_actionscheduler_actions table seems fine, but I’m stuck understanding why the deadlock keeps happening.
Thanks for considering this!
From my server logs:
23058#0: *8382 FastCGI sent in stderr: "PHP message: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query UPDATE wp_actionscheduler_actions SET claim_id=104357, last_attempt_gmt='2022-04-16 17:40:07', last_attempt_local='2022-04-16 17:40:07' WHERE claim_id = 0 AND scheduled_date_gmt <= '2022-04-16 17:40:07' AND status='pending' ORDER BY attempts ASC, scheduled_date_gmt ASC, action_id ASC LIMIT 25 made by do_action('wp_ajax_nopriv_as_async_request_queue_runner'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_DBStore->stake_claim, ActionScheduler_DBStore->claim_actionsPHP message: PHP Fatal error: Uncaught RuntimeException: Unable to claim actions. Database error. in /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:683 Stack trace: #0 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php(597): ActionScheduler_DBStore->claim_actions() #1 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(153): ActionScheduler_DBStore->stake_claim() #2 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(132): ActionScheduler_QueueRunner->do_batch() #3 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-includes/class-wp-hook.php(307): ActionScheduler_QueueRunner->run() #4 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-includes/cla" while reading response header from upstream
and
23055#0: *8378 FastCGI sent in stderr: "PHP message: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query UPDATE wp_actionscheduler_actions SET attempts = attempts+1, status='in-progress', last_attempt_gmt = '2022-04-16 17:40:09', last_attempt_local = '2022-04-16 17:40:09' WHERE action_id = 528531 made by do_action('wp_ajax_nopriv_as_async_request_queue_runner'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_Abstract_QueueRunner->process_action, ActionScheduler_DBStore->log_executionPHP message: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query UPDATE wp_actionscheduler_actions SET attempts = attempts+1, status='in-progress', last_attempt_gmt = '2022-04-16 17:40:10', last_attempt_local = '2022-04-16 17:40:10' WHERE action_id = 528534 made by do_action('wp_ajax_nopriv_as_async_request_queue_runner'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_Abstract_QueueRunner->process_action, ActionScheduler_DBStore->log_executionPHP message: WordPress database error Deadlock found when trying to get lock; try restarting transaction for query UPDATE wp_actionscheduler_actions SET attempts = attempts+1, status='in-progress', last_attempt_gmt = '2022-04-16 17:40:12', last_attempt_local = '2022-04-16 17:40:12' WHERE action_id = 528537 made by do_action('wp_ajax_nopriv_as_async_request_queue_runner'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncReque nginx error
And from WC status logs:
2022-04-16T00:00:02+00:00 CRITICAL Uncaught RuntimeException: Unable to claim actions. Database error. in /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:683 Stack trace: #0 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php(597): ActionScheduler_DBStore->claim_actions() #1 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(153): ActionScheduler_DBStore->stake_claim() #2 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(132): ActionScheduler_QueueRunner->do_batch() #3 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-includes/class-wp-hook.php(307): ActionScheduler_QueueRunner->run() #4 /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply in /var/www/vhosts/rockbrookcamp.com/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 683
System info:
### WordPress Environment ### WordPress address (URL): https://www.rockbrookcamp.com Site address (URL): https://www.rockbrookcamp.com WC Version: 6.4.1 REST API Version: ✔ 6.4.1 WC Blocks Version: ✔ 7.2.2 Action Scheduler Version: ✔ 3.4.0 WC Admin Version: ✔ 3.3.2 Log Directory Writable: ✔ WP Version: 5.9.3 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: ✔ ### Server Environment ### Server Info: nginx/1.20.2 PHP Version: 7.4.28 PHP Post Max Size: 256 MB PHP Time Limit: 600 PHP Max Input Vars: 1000 cURL Version: 7.29.0 NSS/3.53.1 SUHOSIN Installed: – MySQL Version: 5.5.5-10.2.43-MariaDB-log Max Upload Size: 256 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 6.4.1 WC Database Prefix: wp_ Total Database Size: 833.03MB Database Data Size: 550.29MB Database Index Size: 282.74MB wp_woocommerce_sessions: Data: 1.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.22MB + Index: 0.27MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 221.77MB + Index: 133.25MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.09MB + Index: 0.08MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 120.66MB + Index: 94.22MB + Engine InnoDB wp_bv_activities_store: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commentmeta: Data: 2.13MB + Index: 2.14MB + Engine InnoDB wp_comments: Data: 5.42MB + Index: 0.55MB + Engine InnoDB wp_fca_eoi_activity: Data: 0.36MB + Index: 0.45MB + Engine InnoDB wp_fca_eoi_subscribers: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_gfei_import_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gf_addon_feed: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_gf_addon_payment_callback: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_gf_addon_payment_transaction: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_gf_draft_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_gf_entry: Data: 0.52MB + Index: 0.11MB + Engine InnoDB wp_gf_entry_meta: Data: 2.52MB + Index: 2.16MB + Engine InnoDB wp_gf_entry_notes: Data: 0.50MB + Index: 0.14MB + Engine InnoDB wp_gf_form: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gf_form_meta: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_gf_form_revisions: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gf_form_view: Data: 0.16MB + Index: 0.13MB + Engine InnoDB wp_gf_rest_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gv_importentry_log: Data: 3.52MB + Index: 0.14MB + Engine InnoDB wp_gv_importentry_rows: Data: 1.52MB + Index: 0.05MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_nxs_log: Data: 0.19MB + Index: 0.00MB + Engine InnoDB wp_nxs_query: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 2.14MB + Index: 0.08MB + Engine InnoDB wp_postmeta: Data: 35.58MB + Index: 7.73MB + Engine InnoDB wp_posts: Data: 27.09MB + Index: 1.20MB + Engine InnoDB wp_redirection_404: Data: 1.02MB + Index: 0.23MB + Engine InnoDB wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_redirection_items: Data: 0.25MB + Index: 0.27MB + Engine InnoDB wp_redirection_logs: Data: 1.02MB + Index: 0.05MB + Engine InnoDB wp_stream: Data: 4.52MB + Index: 9.06MB + Engine InnoDB wp_stream_meta: Data: 15.52MB + Index: 21.58MB + Engine InnoDB wp_termmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.09MB + Index: 0.09MB + Engine InnoDB wp_term_relationships: Data: 2.06MB + Index: 1.11MB + Engine InnoDB wp_term_taxonomy: Data: 1.08MB + Index: 0.14MB + Engine InnoDB wp_usermeta: Data: 0.27MB + Index: 0.20MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.05MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wpr_rucss_resources: Data: 6.14MB + Index: 0.06MB + Engine InnoDB wp_wpr_rucss_used_css: Data: 80.52MB + Index: 0.39MB + Engine InnoDB wp_yoast_indexable: Data: 7.52MB + Index: 3.08MB + Engine InnoDB wp_yoast_indexable_hierarchy: Data: 0.45MB + Index: 0.61MB + Engine InnoDB wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_primary_term: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_yoast_prominent_words: Data: 1.52MB + Index: 1.08MB + Engine InnoDB wp_yoast_seo_links: Data: 1.52MB + Index: 0.95MB + Engine InnoDB wp_yoast_seo_meta: Data: 0.19MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### acf-field: 100 acf-field-group: 16 ai_playlist: 9 attachment: 6095 custom_css: 1 customize_changeset: 2 easy-opt-ins: 1 gv_importentry_batch: 3 nav_menu_item: 61 oembed_cache: 95 page: 139 people: 92 post: 986 product: 6 product_variation: 28 revision: 103 schema: 2 shop_order: 131 shop_order_refund: 6 wp_global_styles: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (34) ### Gravity Forms: by Gravity Forms – 2.6.1 ACF Content Analysis for Yoast SEO: by Thomas Kräftner ViktorFroberg marol87 pekz0r angrycreative Team Yoast – 3.0.1 Advanced Custom Fields PRO: by Delicious Brains – 5.12.2 Akismet Anti-Spam: by Automattic – 4.2.2 Align RSS Images: by Janis Elsts – 1.3.4 AudioIgniter Pro: by The CSSIgniter Team – 1.6.3 AudioIgniter: by The CSSIgniter Team – 1.7.3 WordPress Backup & Security Plugin - BlogVault: by Backup by BlogVault – 4.77 Disable WooCommerce Bloat: by ospiotr – 2.6.5 Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 4.4 Featured Image Column: by Austin Passy – 0.3.2 Gravity Forms Advanced Post Creation Add-On: by Gravity Forms – 1.2 Gravity Forms AWeber Add-On: by Gravity Forms – 2.11 Maintainn Client: by Maintainn – 1.2.3 Maintainn Tools: by Maintainn – 2.3.4 Nginx Helper: by rtCamp – 2.2.2 Gutenberg PDF Viewer Block: by audrasjb – 1.1 Redirection: by John Godley – 5.2.3 Redis Object Cache: by Till Krüss – 2.0.23 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5 reSmush.it Image Optimizer: by reSmush.it – 0.4.2 Schema: by Hesham – 1.7.9.4 Search Regex: by John Godley – 2.4.1 WDS Breadcrumbs: by WebDevStudios – 1.1 Rockbrook Camp: by WebDevStudios – 1.0.0 WooCommerce Payments: by Automattic – 4.0.0 WooCommerce: by Automattic – 6.4.1 Yoast SEO Premium: by Team Yoast – 18.3 Yoast SEO: by Team Yoast – 18.5.1 WP Rocket: by WP Media – 3.11.0.4 WP Sitemap Page: by Tony Archambeau – 1.9.1 Yoast SEO: Video: by Team Yoast – 14.3 Yoast SEO: WooCommerce: by Team Yoast – 14.6 Yoast Test Helper: by Team Yoast – 1.15 ### Inactive Plugins (6) ### WDS Rockbrook Camp Migration: by WebDevStudios – 10.2019 WDS Single Sign-On: by WebDevStudios – 2.0.1 WDS SSO Addon: by WebDevStudios – 1.0.1 WP Migrate DB Pro: by Delicious Brains – 1.9.13 WP Migrate DB Pro CLI: by Delicious Brains – 1.3.5 WP Migrate DB Pro Media Files: by Delicious Brains – 1.4.15 ### Dropin Plugins (2) ### advanced-cache.php: advanced-cache.php object-cache.php: Redis Object Cache Drop-In ### Must Use Plugins (1) ### ManageWP - Worker Loader: by GoDaddy – ### Settings ### API Enabled: ✔ Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) subscription (subscription) variable (variable) variable subscription (variable-subscription) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: ✔ ### WC Pages ### Shop base: #20686 - /shop/ Cart: #20687 - /cart/ Checkout: #20688 - /checkout/ My account: #20689 - /my-account/ Terms and conditions: #20691 - /terms-of-service/ ### Theme ### Name: Rockbrook Camp Version: 1.0.4 Author URL: http://webdevstudios.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Archive Template: Your theme has a woocommerce.php file you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues. Overrides: – ### Subscriptions ### WCS_DEBUG: ✔ No Subscriptions Mode: ✔ Live Subscriptions Live URL: https://www.rockbrookcamp.com Subscription Statuses: – WooCommerce Account Connected: ✔ Yes Active Product Key: ❌ No ### Store Setup ### Country / State: United States (US) — North Carolina ### Payment Gateway Support ### WooCommerce Payments: products refunds multiple_subscriptions subscription_cancellation subscription_payment_method_change_admin subscription_payment_method_change_customer subscription_payment_method_change subscription_reactivation subscription_suspension subscriptions gateway_scheduled_payments tokenization add_payment_method ### WooCommerce Payments ### Version: 4.0.0 Connected to WPCOM: Yes Blog ID: 1524022 Account ID: acct_1JZL6Q2ETvjtd6uz ### Action Scheduler ### Complete: 507,368 Oldest: 2022-04-13 02:56:13 +0000 Newest: 2022-04-16 17:57:00 +0000 Failed: 245 Oldest: 2022-03-09 21:32:24 +0000 Newest: 2022-04-16 17:45:52 +0000 Pending: 2,268 Oldest: 2022-04-16 17:46:43 +0000 Newest: 2022-06-10 19:57:11 +0000 ### Status report information ### Generated at: 2022-04-16 17:57:03 +00:00
- The topic ‘Deadlock error on ActionScheduler actions table’ is closed to new replies.