WordPress database error Lock wait timeout exceeded
-
We’re running into a recurring issue that blocks subscriptions from renewing. The error pasted below floods the Apache error logs. Every times this happens the processing of subscription renewals is stopped. Which causes quite any issue for our business. We usually reboot the server ,after which subscription are being processed again. However, that’s not a sustainable solution of course. We manage our own server.
Any pointers on how the solve this issue are highly appreciated.
PHP message: WordPress database error Lock wait timeout exceeded; try restarting transaction for query UPDATE PREFIX_actionscheduler_actions SET claim_id=106739, last_attempt_gmt='2022-05-22 14:11:05', last_attempt_local='2022-05-23 00:11:05' WHERE claim_id = 0 AND scheduled_date_gmtdo_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/website.com.au/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:683 Stack trace: #0 /var/www/vhosts/website.com.au/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php(597): ActionScheduler_DBStore->claim_actions() #1 /var/www/vhosts/website.com.au/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(153): ActionScheduler_DBStore->stake_claim() #2 /var/www/vhosts/website.com.au/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(132): ActionScheduler_QueueRunner->do_batch() #3 /var/www/vhosts/website.com.au/httpdocs/wp-includes/class-wp-hook.php(307): ActionScheduler_QueueRunner->run() #4 /var/www/vhosts/website.com.au/httpdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply in /var/www/vhosts/website.com.au/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 683, referer: https://website.com.au/wp-admin/admin-ajax.php?action=as_async_request_queue_runner&nonce=8a20e1a468Running
SELECT * FROM information_schema.innodb_locks;on the database shows:6A66B159:0:73554:246 6A66B159 X RECORD wp_pzsam.PPLANT_actionscheduler_actions claim_id_status_scheduled_date_gmt 0 73554 246 NULL 6A66A532:0:73554:246 6A66A532 X RECORD wp_pzsam.PPLANT_actionscheduler_actions claim_id_status_scheduled_date_gmt 0 73554 246 NULL 6A66A532:0:73554:242 6A66A532 X RECORD wp_pzsam.PPLANT_actionscheduler_actions claim_id_status_scheduled_date_gmt 0 73554 242 NULL 6A6175F8:0:73554:242 6A6175F8 X RECORD wp_pzsam.PPLANT_actionscheduler_actions claim_id_status_scheduled_date_gmt 0 73554 242 NULL### WordPress Environment ### WordPress address (URL): https://website.com.au Site address (URL): https://website.com.au WC Version: 6.5.1 REST API Version: 6.5.1 WC Blocks Version: 7.4.3 Action Scheduler Version: 3.4.0 Log Directory Writable: WP Version: 5.9.3 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: – Language: en_AU External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.29 PHP Post Max Size: 1 GB PHP Time Limit: 300 PHP Max Input Vars: 20000 cURL Version: 7.29.0 NSS/3.53.1 SUHOSIN Installed: – MySQL Version: 5.5.68-MariaDB Max Upload Size: 200 MB Default Timezone is UTC: fsockopen/cURL: SoapClient: DOMDocument: GZip: Multibyte String: Remote Post: Remote Get: ### Database ### WC Database Version: 6.5.1 WC Database Prefix: PREFIX_ Total Database Size: 8804.17MB Database Data Size: 7515.64MB Database Index Size: 1288.53MB PREFIX_woocommerce_sessions: Data: 2.02MB + Index: 0.02MB + Engine InnoDB PREFIX_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB PREFIX_woocommerce_order_items: Data: 21.55MB + Index: 8.34MB + Engine InnoDB PREFIX_woocommerce_order_itemmeta: Data: 195.77MB + Index: 154.30MB + Engine InnoDB PREFIX_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB PREFIX_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_woocommerce_payment_tokens: Data: 1.52MB + Index: 0.34MB + Engine InnoDB PREFIX_woocommerce_payment_tokenmeta: Data: 6.25MB + Index: 5.61MB + Engine InnoDB PREFIX_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB customer: Data: 0.02MB + Index: 0.00MB + Engine InnoDB customer_order: Data: 0.08MB + Index: 0.00MB + Engine InnoDB line_item: Data: 0.02MB + Index: 0.00MB + Engine InnoDB payment_method: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_actionscheduler_actions: Data: 43.06MB + Index: 45.14MB + Engine InnoDB PREFIX_actionscheduler_claims: Data: 0.17MB + Index: 0.11MB + Engine InnoDB PREFIX_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_actionscheduler_logs: Data: 30.06MB + Index: 24.06MB + Engine InnoDB PREFIX_aepc_custom_audiences: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_aepc_logs: Data: 3.52MB + Index: 0.00MB + Engine InnoDB PREFIX_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_comments: Data: 190.73MB + Index: 141.39MB + Engine InnoDB PREFIX_gla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB PREFIX_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_gla_shipping_rates: Data: 0.02MB + Index: 0.05MB + Engine InnoDB PREFIX_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_options: Data: 16.03MB + Index: 2.13MB + Engine InnoDB PREFIX_pmxe_exports: Data: 0.50MB + Index: 0.00MB + Engine InnoDB PREFIX_pmxe_google_cats: Data: 0.39MB + Index: 0.00MB + Engine InnoDB PREFIX_pmxe_posts: Data: 1.52MB + Index: 0.00MB + Engine InnoDB PREFIX_pmxe_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_postmeta: Data: 734.94MB + Index: 734.61MB + Engine InnoDB PREFIX_posts: Data: 58.52MB + Index: 34.89MB + Engine InnoDB PREFIX_pum_subscribers: Data: 0.02MB + Index: 0.06MB + Engine InnoDB PREFIX_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_social_users: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_usermeta: Data: 51.53MB + Index: 35.67MB + Engine InnoDB PREFIX_users: Data: 2.50MB + Index: 1.45MB + Engine InnoDB PREFIX_wcs_payment_retries: Data: 4.52MB + Index: 0.52MB + Engine InnoDB PREFIX_wc_admin_notes: Data: 0.08MB + Index: 0.00MB + Engine InnoDB PREFIX_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB PREFIX_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_wc_customer_lookup: Data: 1.52MB + Index: 0.77MB + Engine InnoDB PREFIX_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_wc_order_bundle_lookup: Data: 2.52MB + Index: 3.19MB + Engine InnoDB PREFIX_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_wc_order_product_lookup: Data: 20.55MB + Index: 18.94MB + Engine InnoDB PREFIX_wc_order_stats: Data: 18.55MB + Index: 15.50MB + Engine InnoDB PREFIX_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB PREFIX_wc_rate_limits: Data: 0.05MB + Index: 0.02MB + Engine InnoDB PREFIX_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_wc_zapier_history: Data: 19.05MB + Index: 0.00MB + Engine InnoDB PREFIX_woocommerce_bundled_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB PREFIX_wpmailsmtp_emails_log: Data: 6074.00MB + Index: 46.30MB + Engine InnoDB PREFIX_wpmailsmtp_tasks_meta: Data: 0.08MB + Index: 0.00MB + Engine InnoDB PREFIX_yith_wcwl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_yith_wcwl_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_yoast_indexable: Data: 10.39MB + Index: 10.73MB + Engine InnoDB PREFIX_yoast_indexable_hierarchy: Data: 2.17MB + Index: 3.25MB + Engine InnoDB PREFIX_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB PREFIX_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB PREFIX_yoast_prominent_words: Data: 0.02MB + Index: 0.05MB + Engine InnoDB PREFIX_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB product: Data: 0.02MB + Index: 0.00MB + Engine InnoDB subscription: Data: 0.05MB + Index: 0.00MB + Engine InnoDB transaction: Data: 0.22MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### attachment: 62 blocks: 4 custom_css: 1 custom-css-js: 8 nav_menu_item: 11 oembed_cache: 8 page: 21 popup: 2 popup_theme: 8 post: 7 product: 12 product_variation: 18 revision: 343 shop_coupon: 39 shop_order: 135989 shop_order_refund: 3443 shop_subscription: 10776 wp_global_styles: 1 wpcf7_contact_form: 2 ### Security ### Secure connection (HTTPS): Hide errors from visitors: ### Active Plugins (38) ### AddressFinder: by AddressFinder – 1.4.9 Akismet Anti-Spam: by Automattic – 4.2.4 Cloudflare: by Cloudflare Inc. – 4.9.1 Contact Form 7: by Takayuki Miyoshi – 5.5.6.1 Simple Custom CSS and JS PRO: by SilkyPress.com – 4.26 Frontend Reset Password: by Square One Media – 1.2 MonsterInsights - eCommerce Addon: by MonsterInsights Team – 8.3.3 MonsterInsights Pro: by MonsterInsights – 8.5.3 Google Listings and Ads: by WooCommerce – 1.13.0 Head, Footer and Post Injections: by Stefano Lissa – 3.2.3 Klaviyo: by Klaviyo Inc. – 3.0.3 MonsterInsights - Dimensions Addon: by MonsterInsights Team – 2.0.4 MonsterInsights - Forms Tracking Addon: by MonsterInsights Team – 2.2.3 MonsterInsights - Page Insights Addon: by MonsterInsights Team – 1.5.0 Nextend Social Login: by Nextendweb – 3.1.4 PixelYourSite PRO: by PixelYourSite – 9.0.0 PixelYourSite Super Pack: by PixelYourSite – 3.0.5 Popup Maker: by Popup Maker – 1.16.7 reCaptcha for WooCommerce: by I Thirteen Web Solution – 2.33 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5 SAHU TikTok Pixel for E-Commerce: by – 1.1.0 SVG Support: by Benbodhi – 2.4.2 User Switching: by John Blackbourn & contributors – 1.5.8 WooCommerce Checkout Field Editor: by WooCommerce – 1.7.3 Braintree for WooCommerce Payment Gateway: by WooCommerce – 2.6.4 WooCommerce Product Bundles: by WooCommerce – 6.15.3 WooCommerce Subscriptions: by WooCommerce – 4.2.0 WooCommerce Zapier: by OM4 Software – 2.3.0 WooCommerce: by Automattic – 6.5.1 Yoast SEO Premium: by Team Yoast – 17.7 Yoast SEO: by Team Yoast – 18.9 WP All Export Pro: by Soflyy – 1.7.6 WP Crontrol: by John Blackbourn & crontributors – 1.12.1 LiveChat: by LiveChat – 4.5.5 WP Mail SMTP Pro: by WPForms – 3.4.0 WP Rollback: by impress.org – 1.7.1 Sequential Order Numbers for WooCommerce: by WebToffee – 1.4.5 YITH WooCommerce Wishlist: by YITH – 3.9.0 ### Inactive Plugins (15) ### Autoptimize: by Frank Goossens (futtta) – 3.0.4 Code Snippets: by Code Snippets Pro – 3.1.0 Facebook for WooCommerce: by Facebook – 2.6.14 Fonts Plugin Pro: by FontsPlugin.com – 1.4.0 Fonts Plugin | Google Fonts Typography: by Fonts Plugin – 3.0.18 Google Analytics for WordPress by MonsterInsights: by MonsterInsights – 8.5.3 Google Tag Manager for WordPress: by Thomas Geiger – 1.15.1 Header and Footer Scripts: by Digital Liberation – 2.2.1 Jetpack: by Automattic – 10.9.1 Maintenance mode for WooCommerce: by netfett – 1.0.15 OMGF: by Daan from FFW.Press – 5.1.2 Site Kit by Google: by Google – 1.74.0 WooCommerce Conversion Tracking: by weDevs – 2.0.9 WPForms Lite: by WPForms – 1.7.4.2 Yoast SEO: WooCommerce: by Team Yoast – 14.4 ### Dropin Plugins (1) ### maintenance.php: maintenance.php ### Settings ### API Enabled: – Force SSL: – Currency: AUD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: bundle (bundle) 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: Enforce Approved Product Download Directories: – ### WC Pages ### Shop base: #7 - /shop/ Cart: #8 - /cart/ Checkout: #9 - /checkout/ My account: #10 - /my-account/ Terms and conditions: #354 - /terms-of-use/ ### Theme ### Name: Flatsome Child Version: 3.0 Author URL: Child Theme: Parent Theme Name: Flatsome Parent Theme Version: 3.15.5 Parent Theme Author URL: http://www.uxthemes.com/ WooCommerce Support: ### Templates ### Overrides: flatsome/woocommerce/archive-product.php flatsome/woocommerce/cart/cart-empty.php flatsome/woocommerce/cart/cart-shipping.php flatsome/woocommerce/cart/cart.php flatsome/woocommerce/checkout/form-checkout.php flatsome/woocommerce/checkout/form-coupon.php flatsome/woocommerce/checkout/terms.php flatsome/woocommerce/checkout/thankyou.php flatsome/woocommerce/content-product-cat.php flatsome/woocommerce/content-product.php flatsome/woocommerce/content-single-product.php flatsome/woocommerce/content-widget-product.php flatsome/woocommerce/global/breadcrumb.php flatsome/woocommerce/global/quantity-input.php flatsome/woocommerce/global/wrapper-end.php flatsome/woocommerce/global/wrapper-start.php flatsome/woocommerce/loop/loop-end.php flatsome/woocommerce/loop/loop-start.php flatsome/woocommerce/loop/pagination.php flatsome/woocommerce/loop/result-count.php flatsome/woocommerce/loop/sale-flash.php flatsome/woocommerce/myaccount/form-login.php flatsome/woocommerce/myaccount/navigation.php flatsome/woocommerce/notices/error.php flatsome/woocommerce/notices/notice.php flatsome/woocommerce/notices/success.php flatsome/woocommerce/product-searchform.php flatsome/woocommerce/single-product/photoswipe.php flatsome/woocommerce/single-product/price.php flatsome/woocommerce/single-product/product-image.php flatsome/woocommerce/single-product/product-thumbnails.php flatsome/woocommerce/single-product/rating.php flatsome/woocommerce/single-product/related.php flatsome/woocommerce/single-product/review.php flatsome/woocommerce/single-product/sale-flash.php flatsome/woocommerce/single-product/share.php flatsome/woocommerce/single-product/short-description.php flatsome/woocommerce/single-product/tabs/tabs.php flatsome/woocommerce/single-product/title.php flatsome/woocommerce/single-product/up-sells.php flatsome/woocommerce/single-product-reviews.php flatsome/woocommerce/single-product.php flatsome/woocommerce/content-product_cat.php ### Subscriptions ### WCS_DEBUG: No Subscriptions Mode: Live Subscriptions Live URL: https://website.com.au Subscription Statuses: wc-active: 3374 wc-expired: 7 wc-on-hold: 1644 wc-cancelled: 5751 WooCommerce Account Connected: Yes Active Product Key: Yes Custom Retry Rules: No Custom Retry Rule Class: No Custom Raw Retry Rule: No Custom Retry Rule: No Retries Migration Status: Completed Report Cache Enabled: Yes Cache Update Failures: 0 failure ### Store Setup ### Country / State: Australia — New South Wales ### Subscriptions by Payment Gateway ### Braintree (Credit Card): wc-active: 2139 wc-cancelled: 3522 wc-expired: 6 wc-on-hold: 1076 Braintree (PayPal): wc-active: 1234 wc-cancelled: 2203 wc-expired: 1 wc-on-hold: 568 ### Payment Gateway Support ### Braintree (PayPal): products card_types payment_form tokenization charge charge-virtual authorization capture_charge customer_decline_messages refunds voids customer_id add_payment_method token_editor subscriptions subscription_suspension subscription_cancellation subscription_reactivation subscription_amount_changes subscription_date_changes multiple_subscriptions subscription_payment_method_change_customer subscription_payment_method_change_admin Braintree (Credit Card): products card_types payment_form tokenization charge charge-virtual authorization capture_charge customer_decline_messages refunds voids customer_id add_payment_method token_editor apple_pay subscriptions subscription_suspension subscription_cancellation subscription_reactivation subscription_amount_changes subscription_date_changes multiple_subscriptions subscription_payment_method_change_customer subscription_payment_method_change_admin ### Product Bundles ### Database Version: 6.15.3 Loopback Test: Template Overrides: – ### Braintree (Credit Card) ### Environment: Production Tokenization Enabled: Debug Mode: Off ### Braintree (PayPal) ### Environment: Production Tokenization Enabled: Debug Mode: Off ### Action Scheduler ### Complete: 97,148 Oldest: 2022-04-24 08:04:11 +1000 Newest: 2022-05-24 05:33:15 +1000 Failed: 40 Oldest: 2020-12-28 21:21:51 +1100 Newest: 2022-05-22 21:23:37 +1000 Pending: 3,406 Oldest: 2022-05-24 06:18:35 +1000 Newest: 2022-06-22 22:04:46 +1000 ### WooCommerce Zapier ### Database Version: 14 Detailed Logging Enabled: Yes Legacy Mode Disabled: Yes SSL: Yes REST API Authentication Key(s): 40 Task History Record Count: 130566 Webhook #41: WooCommerce Zapier - Status: active - Trigger: order.status_changed - Delivery Count: 42781 Webhook #40: WooCommerce Zapier - Status: active - Trigger: subscription.status_changed - Delivery Count: 41682 Deleted Webhook Delivery Count: 750 Customer Action Count: 41658 Subscription Action Count: 3695 ### Status report information ### Generated at: 2022-05-24 06:19:01 +10:00
The topic ‘WordPress database error Lock wait timeout exceeded’ is closed to new replies.