woocommerce / action-scheduler

A scalable, traceable job queue for background processing large queues of tasks in WordPress. Specifically designed for distribution in WordPress plugins (and themes) - no server access required.
https://actionscheduler.org
GNU General Public License v3.0
640 stars 117 forks source link

woocommerce_cleanup_draft_orders adding thousands of entries #870

Closed mohsinevince closed 1 year ago

mohsinevince commented 2 years ago

Prerequisites

Describe the bug

Hello Everyone,

We are facing an issue with action scheduler logs

The woocommerce_cleanup_draft_orders function or something else adding hundreds of entries an hour to the action_scheduler_actions table which is resulting in thousands of actions ignored via wp-cron entries an hour in the action_scheduler_logs table.

wp_action_scheduler_log table is having: ‘action ignored via WP Cron’ thousands of entries wp_actionscheduler_actions:woocommerce_cleanup_draft_orders with status pending

Kindly check the attached screenshot for the same. https://gyazo.com/8afa75d5119ff5dd459ca22c73718d51 https://gyazo.com/3a27793b0600d97dd70338b96738521f

We have tried to delete it from the database but after deletion, it will automatically add with pending status.

We have also tried the below solutions – Removed all the orders – Removed all the customers – Deactivated all the plugins – Switched to default WordPress theme – Reinstalled the WooCommerce – Reviewed all the settings of WooCommerce

Expected behavior

"actions ignored via wp-cron" These entries should not come in wp_action_scheduler_log table

Actual behavior

wp_action_scheduler_log table is having: ‘action ignored via WP Cron’ thousands of entries

Steps to reproduce

The issue occurred automatically on our website

WordPress Environment

WordPress Environment

WordPress address (URL): # Site address (URL): # WC Version: 6.9.4 REST API Version: ✔ 6.9.4 WC Blocks Version: ✔ 8.3.3 Action Scheduler Version: ✔ 3.4.0 Log Directory Writable: ✔ WP Version: 6.0.2 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: –

Server Environment

Server Info: Apache/2.4.54 (Unix) OpenSSL/1.0.2k-fips PHP Version: 8.0.0 PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.29.0 NSS/3.53.1

SUHOSIN Installed: – MySQL Version: 5.5.5-10.2.44-MariaDB Max Upload Size: 2 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 6.9.4 WC Database Prefix: wp_ Total Database Size: 80.24MB Database Data Size: 51.97MB Database Index Size: 28.27MB wp_woocommerce_sessions: Data: 0.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.20MB + Index: 0.09MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 2.52MB + Index: 3.02MB + 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: 0.02MB + Index: 0.13MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 2.52MB + Index: 3.03MB + Engine InnoDB wp_aioseo_notifications: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_aioseo_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.08MB + Index: 0.13MB + Engine InnoDB wp_custom_options_plus: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_digital_dining: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_driver_delivery_tracking: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_driver_rejectorder: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_driver_review: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_event_booking_enabled: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_event_booking_info: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_event_info: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_event_order_details: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_event_packages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_content_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_core_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_languages: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_languages_translations: Data: 0.20MB + Index: 0.00MB + Engine InnoDB wp_icl_locale_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_message_status: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_mo_files_domains: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_node: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_reminders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_strings: Data: 6.52MB + Index: 10.05MB + Engine InnoDB wp_icl_string_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_string_packages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_string_pages: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_string_positions: Data: 1.52MB + Index: 0.19MB + Engine InnoDB wp_icl_string_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_string_translations: Data: 2.52MB + Index: 1.83MB + Engine InnoDB wp_icl_string_urls: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_translate: Data: 1.52MB + Index: 0.05MB + Engine InnoDB wp_icl_translate_job: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_translations: Data: 0.30MB + Index: 0.83MB + Engine InnoDB wp_icl_translation_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_translation_downloads: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_translation_status: Data: 1.52MB + Index: 0.02MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 5.23MB + Index: 0.16MB + Engine InnoDB wp_pmxi_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_hash: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_images: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_imports: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_posts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_postmeta: Data: 9.52MB + Index: 3.77MB + Engine InnoDB wp_posts: Data: 4.48MB + Index: 0.56MB + Engine InnoDB wp_product_restaurant: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_product_restaurant_branch: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_rank_math_internal_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_rank_math_internal_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_restaurant_amenity: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_restaurant_cuisines: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_restaurant_facilities: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_restaurant_gallery: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_restaurant_general_user_notification: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_restaurant_menu: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_restaurant_report: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_restaurant_sales: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_restaurant_user_specific_notification: Data: 0.25MB + Index: 0.08MB + Engine InnoDB wp_review_to_driver: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_temp_digital_dining: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 1.52MB + Index: 1.52MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 1.14MB + Index: 0.11MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_user_login_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_visitor_ips: Data: 0.47MB + Index: 0.10MB + Engine MyISAM 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.02MB + 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.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.05MB + Index: 0.13MB + 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_wfblockediplog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfconfig: Data: 0.50MB + Index: 0.00MB + Engine InnoDB wp_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilemods: Data: 3.52MB + Index: 0.00MB + Engine InnoDB wp_wfhits: Data: 0.25MB + Index: 0.08MB + Engine InnoDB wp_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfknownfilelist: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wflogins: Data: 0.42MB + Index: 0.16MB + Engine InnoDB wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfstatus: Data: 0.13MB + Index: 0.09MB + Engine InnoDB wp_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_square_customers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yoast_indexable: Data: 0.25MB + Index: 0.09MB + Engine InnoDB wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB

Post Type Counts

attachment: 2526 clients: 1 custom_css: 2 customize_changeset: 1 elementor_library: 1 etance_zone_editor: 11 faq: 3 food-recipes: 10 home_banner: 17 location: 3 mc4wp-form: 3 nav_menu_item: 68 offer: 7 page: 49 post: 23 product: 73 restaurant: 1 revision: 358 shop_coupon: 5 shop_order: 2 viwec_template: 14 wooframework: 51 wp_block: 1 wp_global_styles: 2 wp_navigation: 1 wpcf7_contact_form: 2

Security

Secure connection (HTTPS): ✔ Hide errors from visitors: ✔

Active Plugins (29)

Remove Search from admin: by Eatance Team – 5.1.4 Aquila Admin Theme: by Guy Primavera – 3.1.1 Contact Form 7: by Takayuki Miyoshi – 5.6.3 Delivery Zone Manager: by Eatance Team – 1.0.1 Restaurant Driver Management: by Eatance Team – 5.1.1 Recipes: by Eatance Team – 5.1.4 WP Armour - Honeypot Anti Spam: by Dnesscarkey – 2.0.1 Restaurant Address Book: by Eatance Team – 5.1.1 Restaurant Admin Pro: by Eatance Team – 5.1.2 Restaurant Bogo Coupons: by Eatance Team – 5.1.1 Restaurant Bookmark Addon: by Eatance Team – 5.1.1 Restaurant Digital Dining: by Eatance Team – 5.1.1 Restaurant Event Booking: by Eatance Team – 5.1.1 Restaurant Management: by Eatance Team – 5.1.1 Restaurant Menu AddOns: by Eatance Team – 5.1.1 Restaurant Notification: by Eatance Team – 5.1.1 Restaurant Order Cancel Addon: by Eatance Team – 5.1.1 Restaurant Order Type Addon: by Eatance Team – 5.1.1 Restaurant POS System: by Eatance Team – 5.1.1 Restaurant Report: by Eatance Team – 5.1.1 Restaurant Restricted Product Manager: by Eatance Team – 5.1.1 Super Socializer: by Team Heateor – 7.13.36 UPI QR Code Payment Gateway: by Sayan Datta – 1.2.3 Payment Plugins Braintree For WooCommerce: by Payment Plugins support@paymentplugins.com – 3.2.37

Print Invoice & Delivery Notes for WooCommerce: by Tyche Softwares – 4.6.5 WooCommerce: by Automattic – 6.9.4 WP Mail SMTP: by WPForms – 3.5.1 WPS Hide Login: by WPServeur NicolasKulka wpformation – 1.9.6

Sequential Order Numbers for WooCommerce: by WebToffee – 1.4.8

Inactive Plugins (14)

Advanced Product Fields for WooCommerce: by StudioWombat – 1.5.1 Eatace Theme Kit: by Eatance Team – 5.1.1 Paytm WooCommerce Payment Gateway: by Paytm – 2.7.0 Query Monitor: by John Blackbourn – 3.10.1 WooCommerce Square: by WooCommerce – 3.1.0 (update to version 3.2.0 is available) WooCommerce Stripe Gateway: by WooCommerce – 6.5.1 WP All Import - WooCommerce Import Add-On Pro: by Soflyy – 3.3.3 WP All Import Pro: by Soflyy – 4.6.9 WPML All Import: by OnTheGoSystems – 2.3.0 WPML Multilingual CMS: by OnTheGoSystems – 4.5.8 WPML Sticky Links: by OnTheGoSystems – 1.5.4 WPML String Translation: by OnTheGoSystems – 3.2.1 WPML Translation Management: by OnTheGoSystems – 2.10.8 Yoast SEO: by Team Yoast – 19.4

Must Use Plugins (1)

Restaurant Store Analytics: by Eatance Team – 1.0.0

Settings

API Enabled: ✔ Force SSL: – Currency: INR (₹) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)

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: #152143 - /shop/ Cart: woocommerce/woocommerce#62 - /cart/ Checkout: woocommerce/woocommerce#63 - /checkout/ My account: woocommerce/woocommerce#28585 - /my-account/ Terms and conditions: woocommerce/woocommerce#21 - /terms-and-conditions/

Theme

Name: Eatance Classic Plus Version: 1.0.0 Author URL: https://eatanceapp.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

Overrides: eatance-classic-plus/woocommerce/cart/cart-empty.php eatance-classic-plus/woocommerce/cart/cart-item-data.php eatance-classic-plus/woocommerce/cart/cart-shipping.php eatance-classic-plus/woocommerce/cart/cart-totals.php eatance-classic-plus/woocommerce/cart/cart.php eatance-classic-plus/woocommerce/cart/cross-sells.php eatance-classic-plus/woocommerce/cart/mini-cart.php eatance-classic-plus/woocommerce/cart/proceed-to-checkout-button.php eatance-classic-plus/woocommerce/cart/shipping-calculator.php eatance-classic-plus/woocommerce/checkout/cart-errors.php eatance-classic-plus/woocommerce/checkout/form-billing.php eatance-classic-plus/woocommerce/checkout/form-checkout.php eatance-classic-plus/woocommerce/checkout/form-coupon.php eatance-classic-plus/woocommerce/checkout/form-login.php eatance-classic-plus/woocommerce/checkout/form-pay.php eatance-classic-plus/woocommerce/checkout/form-shipping.php eatance-classic-plus/woocommerce/checkout/order-receipt.php eatance-classic-plus/woocommerce/checkout/payment-method.php eatance-classic-plus/woocommerce/checkout/payment.php eatance-classic-plus/woocommerce/checkout/review-order.php eatance-classic-plus/woocommerce/checkout/terms.php eatance-classic-plus/woocommerce/checkout/thankyou.php eatance-classic-plus/woocommerce/emails/admin-cancelled-order.php eatance-classic-plus/woocommerce/emails/admin-failed-order.php eatance-classic-plus/woocommerce/emails/admin-new-order.php eatance-classic-plus/woocommerce/emails/customer-completed-order.php eatance-classic-plus/woocommerce/emails/customer-invoice.php eatance-classic-plus/woocommerce/emails/customer-new-account.php eatance-classic-plus/woocommerce/emails/customer-note.php eatance-classic-plus/woocommerce/emails/customer-on-hold-order.php eatance-classic-plus/woocommerce/emails/customer-processing-order.php eatance-classic-plus/woocommerce/emails/customer-refunded-order.php eatance-classic-plus/woocommerce/emails/customer-reset-password.php eatance-classic-plus/woocommerce/emails/email-addresses.php eatance-classic-plus/woocommerce/emails/email-customer-details.php eatance-classic-plus/woocommerce/emails/email-downloads.php eatance-classic-plus/woocommerce/emails/email-footer.php eatance-classic-plus/woocommerce/emails/email-header.php eatance-classic-plus/woocommerce/emails/email-order-details.php eatance-classic-plus/woocommerce/emails/email-order-items.php eatance-classic-plus/woocommerce/emails/email-styles.php eatance-classic-plus/woocommerce/global/form-login.php eatance-classic-plus/woocommerce/global/quantity-input.php eatance-classic-plus/woocommerce/myaccount/dashboard.php eatance-classic-plus/woocommerce/myaccount/downloads.php eatance-classic-plus/woocommerce/myaccount/form-add-payment-method.php eatance-classic-plus/woocommerce/myaccount/form-edit-account.php eatance-classic-plus/woocommerce/myaccount/form-edit-address.php eatance-classic-plus/woocommerce/myaccount/form-login.php version 4.1.0 is out of date. The core version is 6.0.0 eatance-classic-plus/woocommerce/myaccount/form-lost-password.php eatance-classic-plus/woocommerce/myaccount/form-reset-password.php eatance-classic-plus/woocommerce/myaccount/lost-password-confirmation.php eatance-classic-plus/woocommerce/myaccount/my-account.php eatance-classic-plus/woocommerce/myaccount/my-address.php eatance-classic-plus/woocommerce/myaccount/my-downloads.php eatance-classic-plus/woocommerce/myaccount/my-orders.php eatance-classic-plus/woocommerce/myaccount/navigation.php eatance-classic-plus/woocommerce/myaccount/orders.php eatance-classic-plus/woocommerce/myaccount/payment-methods.php eatance-classic-plus/woocommerce/myaccount/view-order.php eatance-classic-plus/woocommerce/notices/error.php eatance-classic-plus/woocommerce/notices/success.php eatance-classic-plus/woocommerce/order/form-tracking.php eatance-classic-plus/woocommerce/order/order-again.php eatance-classic-plus/woocommerce/order/order-details-customer.php eatance-classic-plus/woocommerce/order/order-details-item.php eatance-classic-plus/woocommerce/order/order-details.php eatance-classic-plus/woocommerce/order/order-downloads.php eatance-classic-plus/woocommerce/order/tracking.php eatance-classic-plus/woocommerce/single-product/rating.php eatance-classic-plus/woocommerce/single-product/review-meta.php eatance-classic-plus/woocommerce/single-product/review-rating.php eatance-classic-plus/woocommerce/single-product/review.php

Outdated Templates: ❌

                    Learn how to update

Admin

Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products experimental-product-tour shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices wc-pay-promotion wc-pay-welcome-page

Disabled Features: minified-js new-product-management-experience settings

Daily Cron: ✔ Next scheduled: 2022-10-04 08:45:18 +05:30 Options: ✔ Notes: 58 Onboarding: completed

Action Scheduler

Complete: 1 Oldest: 2022-10-03 13:22:05 +0000 Newest: 2022-10-03 13:22:05 +0000

Pending: 1 Oldest: 2022-10-04 13:22:05 +0000 Newest: 2022-10-04 13:22:05 +0000

Status report information

Generated at: 2022-10-03 19:06:06 +05:30

Isolating the problem

barryhughes commented 2 years ago

Thanks for the report, @mohsinevince: this seems to be related to code inside the WooCommerce Blocks package, so I have transferred it to the appropriate issue tracker.

mohsinevince commented 2 years ago

Hi @barryhughes, Thanks for moving the issue to the WooCoommerce Blocks package

We have also implemented the below solution but still, the issue is there.

  1. Updated the latest version of WooCommerce 7.0.0 ( Recent Release ), We found that inside the packages folder \woocommerce\packages\action-scheduler the action scheduler Version: 3.4.2
  2. We have updated the latest version [Version 3.5.2] (https://github.com/woocommerce/action-scheduler/releases/tag/3.5.2) manually from the above link.
  3. Existing WordPress with only WooCommerce plugin, deactivated all other third-party plugins

Working fine on the below solution

  1. Installed fresh WordPress
  2. Installed & Configure WooCommerce
  3. Installed all required third-party plugins & our custom plugins

It would be good if team will check this issue and provide a solution for same

Thanks, @mohsinevince

barryhughes commented 2 years ago

Apologies, @mohsinevince—I misinterpreted at first, but it sounds like there are potentially two issues here:

I'm going to move this back to the Action Scheduler issue tracker, since the second point is worth looking at there (and, on re-reading your initial post, seems to be your primary concern). If you also wish to talk to the Blocks team about the number of woocommerce_cleanup_draft_orders actions that are being generated, please create a fresh issue in the Blocks issue tracker.

barryhughes commented 2 years ago

Focusing here on the action ignored via WP Cron part of the problem. Ordinarily, things flow like this:

That's an important check, because it is possible that an action will be manually run after it has been claimed by the queue runner, but before it can be processed. However, what we generally should not see are such large numbers of action ignored via WP Cron log entries (at least 16 in your screenshot, but I'm guessing many more than that) all created in the same second and all relating to the exact same action ID.


It seems possible this could be the result of a conflict with custom code, or another plugin—and that perhaps the claim query is being modified accidentally.

Are you in a position to disable other plugins, besides WooCommerce, and see if the problem continues? If you cannot do this on your production site, are you able to do so on a staging or testing site where you can also replicate the problem? I realize you indicated having done this already in the "Isolating the problem" part of your initial report, but I wanted to confirm this was the case (sometimes, people check those boxes thinking they are required to be able to create a bug report).

mohsinevince commented 2 years ago

Hi @barryhughes

Before posting our issue in git we checked all the prerequisites and we haven't check any checkbox without confirmation.

_It seems possible this could be the result of a conflict with custom code, or another plugin—and that perhaps the claim query is being modified accidentally._

Yes might be, but we have disabled all the plugins except WooCommerce and also try with the Store Front theme and default WP Twenty twentyone theme as well but the same result.

Are you in a position to disable other plugins, besides WooCommerce, and see if the problem continues?

We have tried with the staging server and also in our local development server using XAMPP, and also checked the same issue over the AWS server hosting.

Apart from this, we have found a plugin it will stop all pending jobs: https://github.com/woocommerce/action-scheduler-disable-default-runner, this plugin will work well. but I believe it is not the proper solution.

Regarding the Shared Screenshot ( https://gyazo.com/3a27793b0600d97dd70338b96738521f ) You can see the total row at the bottom ( 21,581 ), which continues to add to table

Thanks,

barryhughes commented 2 years ago

Thanks for the update.

We have found a plugin it will stop all pending jobs: https://github.com/woocommerce/action-scheduler-disable-default-runner, this plugin will work well. but I believe it is not the proper solution.

Agreed; unless you have some other way of triggering queue runners (such as via WP CLI), then that is not going to be ideal.

You can see the total row at the bottom ( 21,581 ), which continues to add to table

To confirm, does this only happen in relation to woocommerce_cleanup_draft_orders tasks? Additionally: it seems strange that those are the only hooks I see in the screenshot, where your query was:

SELECT * FROM `wp_actionscheduler_actions` LIMIT 50

Is that because you removed all other actions to give us a 'cleaner' view of things, or are there literally no other actions being processed?

mohsinevince commented 2 years ago

Hi @barryhughes

Is that because you removed all other actions to give us a 'cleaner' view of things, or are there literally no other actions being processed?

Yes, I have deleted all the actions from WooCommerce >> Status >> Scheduled Actions

https://gyazo.com/6890c1792cfd67632e23103eeb43a63c

Apart from this, I have attached a staging site screenshot here as well

SELECT action_id, COUNT(action_id) FROMwp_actionscheduler_logsGROUP by action_id;

https://gyazo.com/857319a754e02c9bd646e4e44d90acd6 https://gyazo.com/955a8aa81f716580363c88a3c99e0d60 https://gyazo.com/610e1ab621fcee9f49862d94fa5e9ecb

To confirm, does this only happen in relation to woocommerce_cleanup_draft_orders tasks? Additionally: it seems strange that those are the only hooks I see in the screenshot where your query was:

Regarding this not sure which action is having an issue sometimes created ignored log using this woocommerce_cleanup_draft_orders and sometimes using wc-admin_import_orders and wc-admin_import_customers. So we are not sure actually which action is having an issue.

Does the options table is having any issues with serialized entries? like option name CRON or any other that have autoload value and it will auto triggering this?

barryhughes commented 2 years ago

Thanks for those additional notes. Unfortunately, though, I remain unable to reproduce this problem.

Does the options table is having any issues with serialized entries? like option name CRON or any other that have autoload value and it will auto triggering this?

Values in the options table are commonly serialized, but I don't believe that would lead to this problem.

Normally, those 'action ignored' log entries will only be generated if, on attempting to process an action, it is discovered that it is no longer pending.

Now, before an attempt is made to process an action, that action will generally have to have been 'claimed' (a process that ignores actions which are not pending). So, this has to be the result of a race condition of some kind, or else the result of some 'rogue' code in a plugin, or perhaps a custom snippet.

A race condition is not impossible, but some of your screenshots suggest this log entry is being generated multiple times for the same action in the exact same second ... the chances of so many race conditions is surely very unusual.

Unfortunately, without a clear way to reproduce the problem, I'm not sure how much further help we can provide. If others are also experiencing this and have any other information that might be useful, please do feel free to join the conversation.

mohsinevince commented 2 years ago

Hello @barryhughes,

To check out the possibility of a rogue code in a plugin, we also deactivated all plugins expect woocommerce and tried this again.

We know this issue sounds a bit unusual, but people have already started reporting it with different reasons. This is creating some serious trouble for us and certainly, there will be more similar cases in the future, so we would appreciate all the assistance we can get on this.

Let me shed some light on the steps and assist you in reproducing the issue. Please also refer to the attached video for a better understanding.

Thanking you in advance!

For more information please check the below Video URL https://watch.screencastify.com/v/p0FK4sieESREXoaGmyYb

Steps 1) Latest WordPress Installed 2) Deactivated all other plugins expect woocommerce 3) Installed and activated storefront 4) Frontend working fine 5) In the Database still log is running 6) Table size above 20MB

barryhughes commented 2 years ago

Thank you; though it still doesn't leave me in a position where I can replicate locally.

In your screencast, the WooCommerce database update message and range of other existing plugins (though they are deactivated) hint at this not being a 'pristine' installation. Can I ask, is this something you can also replicate in a completely new WordPress installation using just WooCommerce (ie, where you do not install any other components and the database is brand new)?

mohsinevince commented 2 years ago

Hello @barryhughes,

As per our conversation, I already mentioned the above comment https://gyazo.com/aa37bfc537bd60df95a0766b039f3536


If you want the same setup for investigation then I will set it up in a specific URL and provide you access to the same, but I can't share the URL & access over here.

barryhughes commented 2 years ago

As per our conversation, I already mentioned the above comment https://gyazo.com/aa37bfc537bd60df95a0766b039f3536

OK, so based on that earlier note, you are also unable to replicate the problem outside of this one specific environment.

As a further test, what if you migrate your data from the problematic installation to your clean testing site (where you so far cannot replicate the problem)? Are you then able to replicate there? This would help us to determine if the problem is in the data, or if it is the result of either code or some sort of environmental factor.

mohsinevince commented 2 years ago

Hello @barryhughes,

Thanks for the quick updates really appreciate your help

what if you migrate your data from the problematic installation to your clean testing site (where you so far cannot replicate the problem)?

Yes we did this, working fine with a fresh installation

Action taken 1) Download and Install fresh WordPress in the local environment 2) Install & Configure the WooCommerce plugin 3) Install our custom plugins & setup

Are you then able to replicate there?

No, working fine with a fresh installation, (https://localhost/freshwp/) in the same localhost environment

This would help us to determine if the problem is in the data, or if it is the result of either code or some sort of environmental factor.

I believe some issues with the existing WordPress that we are using

Action is taken for an existing website that is having issues with logs

We are working on this issue for 1 month and we have tried all the possible ways but have not found the proper solution that is why we have generated this issue in wordpress.org and woocommerce.com support

Thanks for understanding the actual issue in detail, I hope now the issue has been very clear to you

Let me know if still have any queries or concerns, so based on that we can discuss them over a conversation

barryhughes commented 2 years ago

Unfortunately, I cannot troubleshoot the live environment where this is taking place.

Additionally, it seems that neither of us can replicate, and it does not appear that the source of the issue lies in your database (or, at least, not within the data itself).

roest01 commented 1 year ago

i can not provide any helpful informations but want to notice that i have faced this issue within one of my installation. image

image

I have 0 orders in this shop.

WooCommerce-Version:   7.1.1
WooCommerce REST API-Paket:   7.1.1 /var/www/vhosts/xxx/httpdocs/wp-content/plugins/woocommerce/includes
WooCommerce Blocks-Paket:   8.7.6 /var/www/vhosts/xxx/httpdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/
Aktionsplaner-Paket:   3.4.0 /var/www/vhosts/xxx/httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler
Log-Verzeichnis beschreibbar:   /var/www/vhosts/xxx/httpdocs/wp-content/uploads/wc-logs/
WordPress-Version:   6.1.1
WordPress Multisite:  
WordPress Speicherlimit:   512 MB
WordPress Debug-Modus:  
WordPress Cron:    
Sprache:   de_DE
Externer Objekt-Cache:  
Server-Info:   Apache
PHP-Version:   8.0.26
barryhughes commented 1 year ago

Hi @roest01. Sorry to hear it:

barryhughes commented 1 year ago

...I should add, if this is once again specific to woocommerce_cleanup_draft_orders and does not happen in relation to any other scheduled actions, then perhaps we ought to focus on that aspect. If so, it may now be best to create a fresh issue over in the WooCommerce Blocks project (it is the Blocks package that creates this specific type of action).

mohsinevince commented 1 year ago

Hello @roest01 Our issue is still open, the WooCommerce Team does not provide any solution for this.

So we have to find out an alternative solution for this, we have set up new/fresh WordPress, and Set up Themes & Plugins again to fresh WordPress.

@roest01 I would recommend kindly following the alternate solution for the same. Thanks,

barryhughes commented 1 year ago

@mohsinevince so to confirm, since doing that, you have not encountered any further problems like the one you originally reported? If so, were you able to identify any key differences between the previous, problematic installation and the new one that might help us understand the origin of the problem? Thanks!

ThatGirlSlays commented 1 year ago

Hello. I also experience the same issue. I'm currently troubleshooting my website because I am plagued with 504 Gateway Timeout error. I recently upgraded to a dedicated server thinking that would help but it hasn't. I believe the issue is related to the action scheduler. My action scheduler logs AND actions tables BOTH used to be over 6 MILLION records long. I removed all logs and all actions that were not pending. Over the past few days I've continued to monitor the logs and have since deleted all records in both tables after backing them up. Immediately after truncating the tables, I refreshed my Scheduled Actions page in my admin dashboard and I can see "woocommerce_cleanup_draft_orders" has been created with 219 logs (cutoff in the screensot). image

219 after an immediate refresh of the page (a few seconds). It's been a few minutes, I've refreshed the page and now the record count is 1083. My logs table easily reaches a few hundred thousand in a day. The wp_mail_smtp_admin_notifications_update also created 2840 logs.

barryhughes commented 1 year ago

@ThatGirlSlays—we'd love to look into this in more detail. Right now, though, it isn't clear why this would happen. It would potentially be helpful if you posted a system status report, though—would that be possible?

One item of interest is that it sounds like you may be using WP Mail SMTP, as was the original reporter:

Thank you.

nguyenhuutinh commented 1 year ago

same problem with me

barryhughes commented 1 year ago

Hi @nguyenhuutinh—in line with my previous note, could you provide your system status report (if you are also using WooCommerce) and/or confirm if you are using WP Mail SMTP?

barryhughes commented 1 year ago

Closing: we haven't been able to replicate, and don't have enough information to move this one forward. Should anyone continue to experience this issue please do feel free to create a new issue, with as much information as possible, and we can take a fresh look.