Support » Plugin: Product Feed PRO for WooCommerce » Cron job from server isn’t working with PFPFW

  • Resolved tomeryatir

    (@tomeryatir)


    Hey,

    I have wp-cron disabled through wp-config.
    Then added server-side cron with 15minutes interval.
    The problem is that product feed pro shows that cron is enabled (through Plugin systems check), yet the scheduled tasks are not happening.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Contributor evavangelooven

    (@evavangelooven)

    Hi tomeryatir,

    Theoretically your set-up should work. When the plugin is showing that the cron is enabled it means that the cron events needed for our plugin are set. Your 15 minute-cron-trigger-interval should then at least once an hour pick up the most important cron event (the one that checks if feeds need to be updated). However, when you have set your feed update interval to daily it could take up to 25 hours before the first update takes places.

    Now bear in mind that when your feed contains more than 750 products the plugin will process your feed in batches. After each batch of 750 products a new cron event is set which will process the next 750 products (end so on until all products are in your feed). When the normal WP-cron is enabled those follow-up cron events are triggered three seconds after the previous batch ended. In your set-up it takes 15 minutes before that follow-up event is fired. The result is that processing your full feed could take a long time.

    Hope this makes sense and possibly explains the issue you are experiencing?

    All the best,
    Eva

    Hey Eva,

    When i chceck the products graphs (at Feed statistics),
    I see a gap from 24/11 to 09/02 (when i manually applied the refresh)

    If i’m correct, the graphs should show products feeds updates every day or at least every 25hrs.

    Actually disabling cron job happend in the last 2 weeks, though I’m getting no refreshed data from the graphs, what could cause that, and how can i monitor that the server cron Does work?

    Plugin Contributor evavangelooven

    (@evavangelooven)

    Hi tomeryatir,

    The feed statistics count is done after each complete run/update of the feed is done. When there is no update in the statistics between 24/11 and 09/02 it either means no update took place or your feed is empty?

    When the statistics are not updating it also means your automated cron is not taking place.

    Best,
    Eva

    Hey Eva,

    I’ve investigated further and i see a very strange pattern.
    Some feeds do update regularly and i can see multiple dots on the graph, some feeds are not updating at all (since November).
    All feeds have daily configured update.

    Plugin Contributor evavangelooven

    (@evavangelooven)

    Hi tomeryatir,

    Would you be so kind as to copy/paste the plugin’s debug.log? It will help us understand how you have configured your product feed(s). Instructions on how to retrieve the debug.log can be found here: https://adtribes.io/send-your-debug-log-to-support/

    All the best,
    Eva

    [ Deleted ]

    • This reply was modified 5 months, 3 weeks ago by Jan Dembowski.
    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @tomeryatir Please do not post large code or responses like that here, it doesn’t work after ~10 lines or so.

    If you need share that data please use https://pastebin.com/ instead and post the link to that paste.

    Plugin Contributor evavangelooven

    (@evavangelooven)

    Hi tomeryatir,

    Thanks for sending over the debug.log. You have many feeds configured. Unfortunately you didn’t mention which exact feeds are causing problems so I stopped checking after 17 feeds.

    Things I noticed that a few feeds contain multiple include_only filters. For example:

    
                        [1574087562898] => Array
                            (   
                                [rowCount] => 1574087562898
                                [attribute] => dokan-vendor
                                [condition] => contains
                                [criteria] => vendor-64
                                [than] => include_only
                            )
                        
                        [1574339148976] => Array
                            (   
                                [rowCount] => 1574339148976
                                [attribute] => regular_price
                                [condition] => >=
                                [criteria] => 50
                                [than] => include_only
                            )
    

    That won’t work. You can only have 1 include only filter per feed project (you can have multiple exclude filters though). I suspect that is the problem of many of the feeds. I would start by removing the filters and manually refresh the feeds to see if they do contain products after you did so (just to verify its the cause). Then add 1 include only filter again and repeat the process.

    Alternatively since you have many feeds configured you are at risk of your website/server running into timing or memory issues. Did you check the WooCommerce error logs? Go to WooCommerce > Status > Logs (tab) and search for the most recent error log in the right drop-down. The name will start like this: “fatal-errors-2020-02-11-” (when errors appeared). Could you send me the content of that error log so I can check for errors in it?

    All the best,
    Eva

    Hey Eva,

    Thanks for the suggestion, i will switch the include to exclude and will check the refreshment again, ALTHOUGH the feeds DID manage to filter products through 2 includes, so i had no problem of missing products.

    As for the fatal error logs:
    2020-02-10T07:45:56+00:00 CRITICAL Maximum execution time of 30 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-includes/class-wp-list-util.php בשורה 153

    2020-02-10T08:00:57+00:00 CRITICAL Maximum execution time of 30 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-includes/formatting.php בשורה 2288

    2020-02-10T08:31:01+00:00 CRITICAL Maximum execution time of 30 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-includes/functions.php בשורה 4297

    2020-02-10T08:46:05+00:00 CRITICAL Maximum execution time of 30 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-includes/functions.php בשורה 4297

    קובץ = file
    בשורה = line

    • This reply was modified 5 months, 3 weeks ago by tomeryatir.
    Plugin Contributor evavangelooven

    (@evavangelooven)

    Hi tomeryatir,

    Thanks for that, as suspected your website indeed runs into server restrictions when updating all the feeds. Would it be an option for you to up the maximum execution time to lets say 60 seconds?

    All the best,
    Eva

    Hey Eva,

    I will raise the limit and will update in few days to see if the issue is resolved.

    Thanks Alot!

    Hey Eva,

    i get these errors with 60s execution time:

    2020-02-12T07:46:25+00:00 CRITICAL Maximum execution time of 60 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php בשורה 790

    2020-02-12T08:01:25+00:00 CRITICAL Maximum execution time of 60 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-includes/functions.php בשורה 243

    2020-02-12T08:16:43+00:00 CRITICAL Maximum execution time of 60 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-content/plugins/woocommerce/includes/wc-conditional-functions.php בשורה 340

    2020-02-12T08:32:05+00:00 CRITICAL Maximum execution time of 60 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-includes/cache.php בשורה 536

    2020-02-12T08:46:43+00:00 CRITICAL Maximum execution time of 60 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php בשורה 323

    2020-02-12T09:02:21+00:00 CRITICAL Maximum execution time of 60 seconds exceeded בקובץ /home/ganyavnez/domains/shop.ganyavnez.co.il/public_html/wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php בשורה 2234

    what do you suggest?

    Plugin Contributor evavangelooven

    (@evavangelooven)

    Hi,

    It basically indicates that somehow your server is still running into a timeout. Strange though normally the default execution time of 30 seconds should be enough and 60 seconds should be more than enough.

    Now there are a few steps to continue:

    All the best,
    Eva

    Plugin Contributor evavangelooven

    (@evavangelooven)

    Hi,

    Assuming the issue at hand has been resolved and/or our support is no longer required I am going to close this topic for housekeeping reasons now.

    Don’t hesitate to reach out to us again whenever you need our help.

    All the best,
    Eva

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