• Resolved sanchitgoyal

    (@sanchitgoyal)


    Hello

    I have 2 websites on 2 different servers with similar setup. On both wp cron is disabled and server cron is setup to run after every 5 min. 1 website has 100 products and the feed is generated almost instantly. So no problem there.

    The 2nd website has around 10000 products. I have setup the feed refresh interval to “never” as I plan to manually update the feed once in a while.

    My understanding is that once I click on generate feed the plugin will wait for the server cron to run and when it runs start the feed generation process. Once it process 750 products it will create next task in the cron and will run again the next time server cron runs? Is that correct?

    However when I click on generate feed the process seems to be stuck at 0% processing and when I REFRESH the page the process stops. Also when the process is stuck at processing the server usage is less than 50% as I have checked using the HTOP command and cpu usage is around 30% only.

    So can you please suggest how to solve this and generate the feed successfuly. Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • My understanding is that once I click on generate feed the plugin will wait for the server cron to run and when it runs start the feed generation process. Once it process 750 products it will create next task in the cron and will run again the next time server cron runs? Is that correct?

    Almost correct. When you click on generate feed the plugin will immediately kick off processing the feed. Once it processed the first 750 products the plugin will create a new cron hook. That new cron hook will fire off the next batch of 750 products. When the WP cron is enabled that cron hook will run almost immediately after the previous batch finished. That proces will continue all the way till all products have been processed and the feed is ready. In your case, since 10.000 is more than 750 the plugin would need 14 batches before it is done. Each of those batches will only start processing when your server cron comes by. So it could easily take 14 * 5 = 70 minutes for a feed to complete.

    Now since even the first manually started batch is not running I suspect there might be something else going on. Did you already check the WooCommerce fatal error log of today to see if there is something in there?

    Thread Starter sanchitgoyal

    (@sanchitgoyal)

    Hello

    Thanks for the prompt reply.

    https://www.berrycast.com/conversations/ecfa43d5-6743-515b-8f6b-157e7767de1a

    I have created a video showing the error. What happens is when I create a feed, the server returns error 500. Even though there is error the feed is created but is now stuck at 2%. There are no errors generated in the error log. I have tried this multple times and am able to replicate this. I also tried changing the batch size to 250 but still it was the same problem. Are there any other things I can do to check what is the problem? Thanks

    Hi,

    Thanks for your video, however the video does show a fatal error log for the 24th of September (today). See: https://www.dropbox.com/s/dpuuulttflogv5e/fatal-error.png?dl=0

    Can you share the content of that log here?

    Thread Starter sanchitgoyal

    (@sanchitgoyal)

    Hello

    Actually I had not shared the content because the log entry was only once during the time I was testing the plugin. Even after that I tried the plugi multiple times but no further log was generated. Here is the content of the log. Let Me know if you need anything else. Thanks.

    2021-09-24T11:18:35+00:00 CRITICAL Allowed memory size of 268435456 bytes exhausted (tried to allocate 356352 bytes) in /home/615750.cloudwaysapps.com/hcvdtjevws/public_html/wp-includes/shortcodes.php on line 228
    
    2021-09-24T11:25:59+00:00 CRITICAL Allowed memory size of 268435456 bytes exhausted (tried to allocate 245760 bytes) in /home/615750.cloudwaysapps.com/hcvdtjevws/public_html/wp-includes/kses.php on line 1807
    
    2021-09-24T11:26:30+00:00 CRITICAL Allowed memory size of 268435456 bytes exhausted (tried to allocate 245760 bytes) in /home/615750.cloudwaysapps.com/hcvdtjevws/public_html/wp-includes/kses.php on line 1807
    
    Thread Starter sanchitgoyal

    (@sanchitgoyal)

    Hello

    An update. I left the processing on and when I checked after some hours it was done!

    However the processing seems to be going REALLY SLOW.

    For example- I created a new feed and selected only 1 category with around 100 products and generated feed. It has been around 1 hour now and it is still at 30%. Is this normal? If We create a feed for only 1 category does it still process all 1000s of prodcts?

    I checked My server usage and both cpu and ram are less than 50% used. Are there any other factors such as php processing time etc which might be affecting slow speed? Thanks

    If We create a feed for only 1 category does it still process all 1000s of prodcts?

    –> yes that is correct, the plugin will still retrieve all products and than execute the filters on them.

    It has been around 1 hour now and it is still at 30%. Is this normal?

    –> that depends, when you have disabled the WP-cron and are using an external server cron than it could take longer. Or when you have a caching plugin installed it could also be caching the processing status.

    Thread Starter sanchitgoyal

    (@sanchitgoyal)

    Update-

    I tried the plugin on staging website with wp-cron disabled and the process was completed fairly quickly.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Query regarding Server cron and product feed’ is closed to new replies.