644 Past due actions
-
Hi,
I’m working on a multi-site WooCommerce store. It seems the WP-cron does not work correctly as I see 644 past due actions from Woocommerce.
Run them manually works, but after a while new past due actions appear.
I do not understand this. I’m building woocommeerce stores for more then 10 years now and never seen the issue before.
-
This topic was modified 8 months, 1 week ago by
quinox.
-
This topic was modified 8 months, 1 week ago by
-
Hey there, @quinox! Thanks for contacting us. I’m happy to help you.
Can you please share a screenshot of some of those so we can take a look?
I recommend using https://snipboard.io. You can share the direct link to the image as a response to this topic.Furthermore, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:
System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
Fatal error logs (if any) under WooCommerce > Status > Logs. Then you can use the selector to search for Fatal Errors.
You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.Looking forward to your reply.
Have a wonderful day!
System Status Report
### WordPress Environment ### WordPress address (URL): [Redacted] Site address (URL): [Redacted] WC Version: 9.0.2 Legacy REST API Package Version: De Legacy REST API-plugin is niet ge?nstalleerd op deze site. Action Scheduler Version: ? 3.7.4 Log Directory Writable: ? WP Version: 6.5.5 WP Multisite: ? WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ? Language: nl_NL External object cache: – ### Server Environment ### Server Info: LiteSpeed PHP Version: 8.2.13 PHP Post Max Size: 512 MB PHP Time Limit: 30 PHP Max Input Vars: 15000 cURL Version: 7.87.0 OpenSSL/1.1.1w SUHOSIN Installed: – MySQL Version: 10.11.7-MariaDB-cll-lve Max Upload Size: 1 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### [REDACTED] ### Post Type Counts ### acf-field: 399 acf-field-group: 35 attachment: 305 nav_menu_item: 79 page: 20 pewc_field: 406 pewc_group: 79 post: 1 product: 184 revision: 207 shop_order_placehold: 4 wp_navigation: 1 wpcf7_contact_form: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (25) ### ACF Content Analysis voor Yoast SEO: door Thomas Kr?ftner ViktorFroberg marol87 pekz0r angrycreative Team Yoast – 3.1 Advanced Custom Fields PRO: door WP Engine – 6.3.0.1 Responsive Menu Pro: door ExpressTech – 3.1.31 Premmerce Permalink Manager for WooCommerce: door Premmerce – 2.3.11 Yoast SEO: door Team Yoast – 22.8 WP All Import Pro: door Soflyy – 4.8.7 WP Crontrol: door John Blackbourn – 1.16.3 WP All Import - WooCommerce Import Add-On Pro: door Soflyy – 4.0.0 WooCommerce: door Automattic – 9.0.2 ACF Content Analysis voor Yoast SEO: door Thomas Kr?ftner ViktorFroberg marol87 pekz0r angrycreative Team Yoast – 3.1 Advanced Custom Fields PRO: door WP Engine – 6.3.0.1 Yoast SEO: door Team Yoast – 22.8 Max Mega Menu: door megamenu.com – 3.3.1 Advanced Woo Search: door ILLID – 3.07 WP Menu Cart Pro: door WP Overnight – 4.0.1 Max Mega Menu - Pro Addon: door megamenu.com – 2.3.1.1 Responsive Menu Pro: door ExpressTech – 3.1.31 FacetWP: door FacetWP LLC – 4.2.11 Advanced Custom Fields: Extended PRO: door ACF Extended – 0.8.9.5 Contact Form 7: door Takayuki Miyoshi – 5.9.5 Flexible Checkout Fields PRO: door WP Desk – 4.0.6 Flexible Checkout Fields: door WP Desk – 4.1.6 WooCommerce Fees and Discounts: door Plugin Republic – 2.0.3 WooCommerce Product Add-Ons Ultimate: door Plugin Republic – 3.21.1 WP Global Cart: door Nsp Code – 4.6.1 ### Inactive Plugins (4) ### Duplicator Pro: door Duplicator – 4.5.15 WooCommerce Product Add-Ons Ultimate: door Plugin Republic – 3.17.1 WP All Export - WooCommerce Export Add-On Pro: door Soflyy – 1.0.9 WP All Export Pro: door Soflyy – 1.8.8 ### Must Use Plugins (1) ### woo-gc.php: door – ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: left_space 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: ? HPOS feature enabled: ? Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore HPOS data sync enabled: – ### Logging ### Enabled: ? Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2 Retention period: 30 dagen Level threshold: – Log directory size: 5 KB ### WC Pages ### Winkelbasis: #230 - /assortiment/ Winkelwagen: #231 - /winkelwagen/ Afrekenen: #232 - /afrekenen/ Mijn account: #233 - /mijn-account/ Algemene voorwaarden: ? Pagina niet ingesteld ### Theme ### Name: Master Version: 3.0.2 Author URL: https://webinweb.nl Child Theme: ? – Als je wijzigingen aanbrengt in WooCommerce of in een hoofdthema dat je niet zelf gebouwd hebt raden we het gebruik van een sub thema aan. Zie: Hoe maak je eensub thema WooCommerce Support: ? ### Templates ### Overrides: master/woocommerce/archive-product.php master/woocommerce/cart/cart.php master/woocommerce/checkout/form-checkout.php master/woocommerce/checkout/terms.php master/woocommerce/content-single-product.php master/woocommerce/myaccount/form-login.php master/woocommerce/myaccount/navigation.php versie 2.6.0 is verouderd. De hoofdversie is 9.0.0 master/woocommerce/single-product/related.php master/woocommerce/single-product/tabs/tabs.php master/woocommerce/single-product/up-sells.php master/woocommerce/single-product.php Outdated Templates: ? Leer hoe te updaten ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customize-store customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks product-custom-fields remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience pattern-toolkit-full-composability product-pre-publish-modal settings async-product-editor-category-field launch-your-store product-editor-template-system Daily Cron: ? Next scheduled: 2024-01-19 12:38:09 +02:00 Options: ? Notes: 65 Onboarding: skipped ### Action Scheduler ### Afgerond: 70 Oldest: 2024-02-05 15:36:58 +0000 Newest: 2024-06-25 12:23:25 +0000 In afwachting: 643 Oldest: 2024-06-19 07:50:55 +0000 Newest: 2024-06-25 12:08:17 +0000 ### Status report information ### Generated at: 2024-06-25 15:34:32 +02:00
Hi @quinox,
By default, WooCommerce schedules the
woocommerce_run_product_attribute_lookup_update_callback
action any time a product is edited/updated, regardless of the means of editing/updating. You can search the Scheduled Actions found under WooCommerce > Status > Scheduled Actions for the product ID you edited to see if the task is scheduled.This process is necessary to update the product lookup tables. If the tables aren’t updated, the changes will not be reflected on shop pages, etc.
I’m working on a multi-site WooCommerce store. It seems the WP-cron does not work correctly as I see 644 past due actions from Woocommerce.
From what I’ve seen in the past, this problem can happen when running imports with tools like WP All Import, which I see is installed on your site. I assume this was the case because you were importing a lot of products with this plugin.
Now, from your System Status Report (SSR) I see that your
PHP Time Limit
?is set to 30, which is too low. This is usually the limiting factor for the action scheduler and might explain why these actions are stuck. Consider increasing it to a range of about 900 – 1200.Just to clarify, the PHP Time Limit is the maximum amount of time that PHP scripts are allowed to run. If any script runs longer than the set time, PHP will stop it and flag an error. You can adjust this by tweaking the?
max_execution_time
?in your PHP configuration file. Your hosting provider should be able to help you with this.I hope this helps!
-OPHi Omarfpg,
I’ve set the max_execution_time to 1000 and see how it goes. Do I have to run the tasks manually or can I safely delete theme?
Regards,
RolandNone of the advise above solved my problem. I had to do more investigation.
I came acrosss – define(‘ALTERNATE_WP_CRON’, true); – rule to add in the wp-config.php file. Added this rule on top of this file and the woocommerce schedules are running just fine now.
Editing a product. A new task is being made and within 2 minutes this task has run.
I do not know what this exactly does, but it is working for me on a Litespeed webserver.
Regards,
Roland de LepperGlad to hear you got to the bottom of that and thanks for sharing the solution. For anyone else coming across this reply: In WordPress, the?
define('ALTERNATE_WP_CRON', true);
?setting is used to enable an alternative method for handling scheduled tasks (cron jobs) when the standard WP-Cron system does not work reliably on a hosting environment. Here’s what happens when you use this setting:- Alternative Scheduling Method: Normally, WP-Cron relies on website visitors to trigger scheduled tasks by accessing the website. If your site has inconsistent traffic, scheduled tasks might not run on time. Setting?
ALTERNATE_WP_CRON
?to?true
?ensures that cron tasks are triggered even if there is no site activity. - How It Works: When this alternative method is enabled, it uses a redirect approach on client-side requests to simulate a cron run. This happens through a redirection to the same URL with additional cron arguments that initiate the scheduled tasks in the background.
- Considerations: While?
ALTERNATE_WP_CRON
?can solve problems with cron job execution, it may sometimes cause issues like redirect loops or impact the performance perceived by users because it forces a task to run during a user’s visit.
This feature is part of a workaround to the limitations of the standard WP-Cron system and is usually used as a last resort when other methods to handle cron jobs (like setting up a real cron job through cPanel or other hosting services) aren’t feasible.
- Alternative Scheduling Method: Normally, WP-Cron relies on website visitors to trigger scheduled tasks by accessing the website. If your site has inconsistent traffic, scheduled tasks might not run on time. Setting?
- The topic ‘644 Past due actions’ is closed to new replies.