• Resolved abidg

    (@abidg)


    I’ve an e-commerce website where I see thousands of never ending scheduled actions. Are these necessary ? how can I completely disable these scheduled actions of “woocommerce_deliver_webhook_async”.

    Please help!

    • This topic was modified 2 months, 3 weeks ago by abidg. Reason: screenshot of the issue I'm talking about
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Jonayed (woo-hc)

    (@jonayedhosen)

    Hi @abidg ,

    Thanks for reaching out! It seems like you’re running into some performance issues due to the woocommerce_deliver_webhook_async scheduled actions in WooCommerce. These actions are responsible for delivering webhook payloads asynchronously, but over time, they can build up and cause database bloat, slowing things down.

    To resolve this, here’s what you can do:

    1. Go to WooCommerce > Settings > Advanced > Webhooks.
    2. Review the list of active webhooks and disable or delete any that are no longer needed or linked to plugins you’re not using anymore.

    You can also install the WP Crontrol plugin (here) to better manage scheduled actions. After installing, go to Tools > Cron Events and search for the woocommerce_deliver_webhook_async actions. You can manually delete any pending actions there to clear the backlog.

    If you’d prefer, you can add this code switch to synchronous webhook delivery:

    add_filter('woocommerce_webhook_deliver_async', '__return_false');

    This code forces WooCommerce to deliver webhooks synchronously, bypassing the scheduling system. However, be aware that this may impact site performance, especially if webhook endpoints are slow to respond, as it could delay page loads for users.

    If you’re comfortable with editing your site’s code, you can add this snippet to your child theme’s?functions.php?file. Alternatively, for a safer method, you can use a plugin like?Code Snippets?to apply the code without directly editing your files.

    If you’re looking to find the root cause of the excessive webhooks, try deactivating plugins one by one to see which one is generating them. Once you’ve identified the culprit, you might want to reconfigure or replace the plugin to avoid future issues.

    After clearing the backlog, don’t forget to optimize your database to help with performance. The WP-Optimize plugin (here) can assist with that.

    I hope this helps!

    Thread Starter abidg

    (@abidg)

    Thanks for your kind reply.

    Actually, I’ve already been gone through these steps but still it is popping up and causing performance issues. I’d used WP Crontrol?plugin but it doesn’t show any woocommerce_deliver_webhook_async actions which is quite strange.

    Thread Starter abidg

    (@abidg)

    [21-Dec-2024 19:59:40 UTC] PHP Fatal error: Uncaught InvalidArgumentException: Unidentified action 1278718: we were unable to mark this action as having failed. It may may have been deleted by another process. in /home/host/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:1091
    Stack trace: 0 /home/host/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php(121): ActionScheduler_DBStore->mark_failure() 1 /home/host/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php(99): ActionScheduler_Abstract_QueueRunner->handle_action_error() 2 /home/host/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(170): ActionScheduler_Abstract_QueueRunner->process_action() 3 /home/host/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(140): ActionScheduler_QueueRunner->do_batch() 4 /home/host/public_html/wp-includes/class-wp-hook.php(324): ActionScheduler_QueueRunner->run() 5 /home/host/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 6 /home/host/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() 7 /home/host/public_html/wp-cron.php(191): do_action_ref_array() 8 {main}

    thrown in /home/host/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 1091

    Thread Starter abidg

    (@abidg)

    this error came when I deleted all pending Scheduled Actions

    Thread Starter abidg

    (@abidg)

    @jonayedhosen

    1. WooCommerce > Settings > Advanced > Webhooks

      only 5 required webhooks there and those are not related to this.. I’d contacted their support and they’re saying that these web-hooks are not created by their webhooks

      2. WP Crontrol?plugin

      Tools > Cron Events

      Nothing is there related to woocommerce_deliver_webhook_async, even can’t find anything with search

      synchronous webhook delivery

      I’ve added this code into functions.php of child theme but those webhooks are being creating massively like 60k to 80k on daily basis and badly impacting the performance.

      I want to completely disable these scheduled actions/woocommerce_deliver_webhook_async

      Plugin Support Zubair Zahid (woo-hc)

      (@doublezed2)

      Hello abidg,

      Thank you for your reply.

      I recommend performing a conflict test to identify the source of these webhooks.
      WooCommerce does not create 60,000 to 80,000 webhooks daily by default.

      Please let me know about your findings.

      Best regards.

    Viewing 6 replies - 1 through 6 (of 6 total)
    • You must be logged in to reply to this topic.