• Resolved johnboy85

    (@johnboy85)


    I am using the topic “order updated” to trigger when an order is completed which then activates my scenario to run on Integromat. The webhook module on Integromat is set up to trigger instantly once it receives the webhook data from my website. Everything works great it’s just really slow. It can take up to 15 minutes before Integromat receives the webhook data.

    Is there anyway to fix this? I need for the webhook to trigger almost instantly.

    My website doesn’t get much traffic and it is hosted through Siteground. I am also using the SG Optimizer plugin that Siteground offers. In this plugin there is a setting for WordPress Heartbeat Optimization. This setting is enabled. It says the following:
    “By default, the WordPress Heartbeat API checks every 15 seconds on your post edit pages and every 60 seconds on your dashboard and frontend whether there is a scheduled tasks to be executed. This can generate high CPU usage if you leave browser tabs in which you’re logged to WordPress opened for a longer period of time. With this option, you can make the checks run less frequently or completely disable them.”

    I have the following configured:
    WordPress Admin Pages – 300s
    Post and Page Edit – 30s
    Site Frontend- 300s

    Awhile back I had a problem where I was getting 503 errors on my website and Siteground said it was from cron jobs using up all my server resources. I am not sure what exactly they did to fix it but I noticed the following in my WordPress cron events: The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled.

    From my understanding, Webhooks are viewed as background scheduled actions. If I open the Scheduled Actions tool within WordPress I can see the delay in each woocommerce_deliver_webhook_async. Here is a log example:

    2021-07-20 11:13:56 +0000
    action created
    2021-07-20 11:30:02 +0000
    action started via WP Cron
    2021-07-20 11:30:04 +0000
    action complete via WP Cron

    Any suggestions on how to get webhooks to trigger faster? Is there anything I need Siteground to do on their end or any settings I could change in the WordPress dashboard?

    If you guys could point me in the right direction to speed up this webhook I’d really appreciate it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    WooCommerce has a filter which you can use to circumvent the orderly queue management. Here is a gist that has the corresponding filter: https://gist.github.com/lukecav/920cb2a2edc8a4280eccf78bbfc85143

    Using this will make webhooks fire immediately.

    Please note that we provide no warranty or support for custom code or 3rd party plugins (meaning we cannot not help you further with this code snippet or www.remarpro.com / GitHub plugins). Use them at your own risk.

    **Also: Before you do that, please do make a full backup!**

    Kind regards,

    Thread Starter johnboy85

    (@johnboy85)

    Hello,

    Thank you for the suggestion I’ll go ahead and give it a try. Hopefully in a future version of Woocommerce we get a webhook setting to define how fast we want it to trigger.

    Going by post from other forums, it seems quite a few people are also trying to speed up the Woocommerce Webhooks.

    Plugin Support con

    (@conschneider)

    Engineer

    Hi again,

    Thank you for the suggestion I’ll go ahead and give it a try. Hopefully in a future version of Woocommerce we get a webhook setting to define how fast we want it to trigger.

    Maybe.
    I haven’t dabbed with the subject but I imagine making a queue of scheduled jobs configurable can wreak havoc pretty fast. There is probably a good reason why the queue management for scheduled jobs is as rigid as it is.

    Kind regards,

    Hi @johnboy85

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. If you have further questions, please feel free to open a new topic.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Woocommerce Webhooks are Very Slow to Trigger’ is closed to new replies.