• Resolved romeon

    (@romeon)


    I had a problem where the sync stopped/froze. No fatal errors. So I thought Id go CLI but it only said

    [site@site www]$ wp action-scheduler run –group=”mc-woocommerce”
    0 batches executed.
    Success: 0 scheduled tasks completed.

    So I ran the resync=1, and now it seems to be syncing (simultaneously??) when i run the wp action-scheduler run.. However! It pops 1 row at a ttime, 1 task completed.. Is this the correct way it’s being handled? See part of it here:

    Running 1 action  100% [=======================================================================================================================================================] 0:00 / 0:00
    Found 1 scheduled task
    Started processing action 686115
    Completed processing action 686115 with hook: MailChimp_WooCommerce_Process_Orders
    Running 1 action  100% [=======================================================================================================================================================] 0:00 / 0:00
    Found 1 scheduled task
    Started processing action 686116
    Completed processing action 686116 with hook: MailChimp_WooCommerce_Process_Orders
    Running 1 action  100% [=======================================================================================================================================================] 0:00 / 0:00
    Found 1 scheduled task
    Started processing action 686117
    
Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter romeon

    (@romeon)

    Additional info. So “815 scheduled taks completed”. After I ran cli. However, there should be more than that. Visiting the admin area, it shows as if it’s still syncing.. and not everything is synced. Please advice.

    View post on imgur.com

    Edit: addion: I have set the cron in the wp-config to disabled, and added the server cron to:

    0 * * * * wp cron event run --due-now --path=/home/site/www/ --quiet

    Can that be something that is holding it back?

    • This reply was modified 5 years ago by romeon. Reason: Added cron code
    Thread Starter romeon

    (@romeon)

    No one has an answer from the team? Syncing is not working.. CLI is not working. We could really use some urgent help.

    Plugin Author ryanhungate

    (@ryanhungate)

    @romeon can you please verify the version of the plugin you’re currently using? At the time of my response here, we are at version 2.3.5. If you are not on that version, please update.

    Also – if you could check the Woo Fatal Logs to see if anything has halted that sync in it’s tracks, please provide what you have in that file.

    Sometimes what you’ll have to do in these situations is simply add a &restart_order_sync=1 into the query string and reload the page.

    We’ll be glad to get you all squared away – looking out for your responses now.

    Thread Starter romeon

    (@romeon)

    @ryanhungate

    MC: 3.3.5
    WP latest of today
    WC: Latest 3.x

    Adding &restart_order_sync=1 gives a fatal error.

    2020-03-19T11:31:19+00:00 CRITICAL Uncaught RuntimeException: Error saving action: Incorrect table name '' in /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:74
    Stack trace:
    #0 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/ActionScheduler_ActionFactory.php(177): ActionScheduler_DBStore->save_action(Object(ActionScheduler_Action))
    #1 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/ActionScheduler_ActionFactory.php(84): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action))
    #2 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/functions.php(30): ActionScheduler_ActionFactory->single('MailChimp_WooCo...', Array, 1584617479, 'mc-woocommerce')
    #3 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/bootstrap.php(146): as_schedule_ i /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php p? rad 74
    
    2020-03-19T11:31:31+00:00 CRITICAL Uncaught RuntimeException: Error saving action: Incorrect table name '' in /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:74
    Stack trace:
    #0 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/ActionScheduler_ActionFactory.php(177): ActionScheduler_DBStore->save_action(Object(ActionScheduler_Action))
    #1 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/ActionScheduler_ActionFactory.php(84): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action))
    #2 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/functions.php(30): ActionScheduler_ActionFactory->single('MailChimp_WooCo...', Array, 1584617491, 'mc-woocommerce')
    #3 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/bootstrap.php(146): as_schedule_ i /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php p? rad 74
    
    2020-03-19T11:32:49+00:00 CRITICAL Uncaught RuntimeException: Error saving action: Incorrect table name '' in /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:74
    Stack trace:
    #0 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/ActionScheduler_ActionFactory.php(177): ActionScheduler_DBStore->save_action(Object(ActionScheduler_Action))
    #1 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/ActionScheduler_ActionFactory.php(84): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action))
    #2 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/functions.php(30): ActionScheduler_ActionFactory->single('MailChimp_WooCo...', Array, 1584617569, 'mc-woocommerce')
    #3 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/bootstrap.php(146): as_schedule_ i /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php p? rad 74
    
    2020-03-19T11:32:50+00:00 CRITICAL Uncaught RuntimeException: Error saving action: Incorrect table name '' in /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:74
    Stack trace:
    #0 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/ActionScheduler_ActionFactory.php(177): ActionScheduler_DBStore->save_action(Object(ActionScheduler_Action))
    #1 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/ActionScheduler_ActionFactory.php(84): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action))
    #2 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/functions.php(30): ActionScheduler_ActionFactory->single('MailChimp_WooCo...', Array, 1584617570, 'mc-woocommerce')
    #3 /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/bootstrap.php(146): as_schedule_ i /home/mywebsite/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/vendor/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php p? rad 74
    
    Plugin Author ryanhungate

    (@ryanhungate)

    @romeon this boils down to an issue from the Action Scheduler that needs a little attention. You’ll have to refer to this github issue to fix that problem.

    Please feel free to open up another ticket over there if you needed help, but this is something that should be fairly easy to resolve. The plugin team at woo has been fantastic helping folks out with this problem and they’re on it when need be.

    Thread Starter romeon

    (@romeon)

    @ryanhungate Github issue solved the fatal error. But the sync is still not working.. Sometimes the wp cli command finds tasks.. and run like 400 things.. But there are 6000+ orders. Now it’s stuck at 2000 synced. No matter if I run the resunc, the resync order restart.. Still same thing. Help would be greatly appreciated.

    Plugin Author ryanhungate

    (@ryanhungate)

    @romeon ok progress is good – means we’re getting somewhere. Now I would like to know if you’ve got other errors in your woo fatal logs that we need to look at? If you’ve synced 2,000 orders or so, that means it’s working – but then it might be failing due to an action hook on a bad order / bad data for an order. We’ve seen this happen where even while trying to view the order that’s failing in the woo admin, it errors out as well.

    Let’s see if we can find anything else in the current error logs?

    When you run the &restart_order_sync=1 command, does it TRY to do something?

    Thread Starter romeon

    (@romeon)

    @ryanhungate THanks for the reply.

    No fatal errors. The sync is going.. SLOWLY, so stuck as in “barely movign”. the &restart_order_sync=1 does absolutely nothing. It just reloads the page.

    Checking the scheduler, it seems as if Mailchimp however has done LOADS seee image:

    View post on imgur.com

    Also as mentioned in the first post, I have disapled wp-cron job and run a cronjob each hour, does that have anything that interfeers with this?

    Plugin Author ryanhungate

    (@ryanhungate)

    @romeon oh ok… now this is making sense. Basically you’re processing like 5 jobs every hour because of that cron job schedule. I would set that up on the most frequent setting that you’re allowed to use. It’s even a good idea to do it every minute.

    Once you fix this, that will resolve your issue for sure ?? Closing out because that’s the solution. Please feel free to reach out again if you still have trouble of course.

    Thread Starter romeon

    (@romeon)

    @ryanhungate Thanks, but it is yet not resolved =)

    So it’s still barely syncinc. Running the CLI command gives 0 tasks. No Fatal errors. Cron set to 1 minute. I tried to run the &restart_order_sync=1 10 times. Now instead of 6000 orders, it found 14 000 order. And went from 2000 synced orders to 3400. but been stuck there the entire day. So something is really not working.

    The &restart_order_sync=1, is it supposed to set it to 0? Cause it’s not.

    One weird thing though: If i tried, say a few times a hour to run the cli command. Most of the times nothing happens. But sometimes it does.. So. What’s really wrong here? Here’s the list of the action scheduler:

    View post on imgur.com

    So got running schedules and pending.. But doesn’t seem to help to run the cli command. So my friend, what’s the next step?

    Plugin Author ryanhungate

    (@ryanhungate)

    @romeon hey sorry for the delay – so from the screenshot you’ve showed me, this seems like it’s doing more than it should, and it might even have to do with the fact you’ve been doing that restart_order_sync command. Let’s not do that anymore to be sure it’s not just adding extra jobs to the mix.

    Can you possibly remove all of the ones that are in there currently, and then simply run that command when there is no other Process_Orders jobs? Let’s see it have a single job, and run it manually if you would like to see this happen quicker.

    I’m thinking that you might also need to take a look at your cron scheduler to make sure the changes you’ve made have indeed “stuck” with the server. Have you been able to verify that it’s running every minute?

    Thread Starter romeon

    (@romeon)

    I updated how the cron is working to a more advanced way with fstop (thus only running one cron at a time). But it still not completing the ENTIRE order-part. When I run the cli command sometimes it doesnt find the task. Sometimes it does. Like now its running, this morning it ran too. But it gives aroun 700 tasks completed. So not quite sure how this is supposed to work. Does it split the tasks?

    Plugin Author ryanhungate

    (@ryanhungate)

    @romeon each task will process 5 orders – so in theory if you had 700 Mailchimp jobs it would have processed up to 3500 orders if they didn’t fail for some reason. Can you please confirm your order count – or possibly look in the plugin logs to see if you see orders being processed? If this is running correctly you should be getting over 12k orders a day on the sync for sure. If not, we should probably look into why it’s not ( which is what we’re both trying to do through chat ).

    Thread Starter romeon

    (@romeon)

    It’s really weird. Its barely doing 1 each second, and running now 4-10 tasks untili run it again, but i have to run the command 4-5 times. See video for more explanation:

    Plugin Author ryanhungate

    (@ryanhungate)

    @romeon hey thanks for the video. This feels as if you’ve got the web version and the CLI version both running at the same time. If you’re going to run this in CLI mode, you should have also followed the instructions of the Action Scheduler CLI instructions in order for the CLI to work as expected.

    That being said, I’m now starting to wonder if you’ve restarted the sync too many times, so your “count” on the overview screen might not be getting updated to the real numbers yet. When you look at your LOGS screen for the most recent days, are you seeing that it’s doing 1 order every second? If so that would mean you should be getting at least 40 per minute – or 2400 an hour. I’m wondering if there is something preventing the sync like possibly the pagination not working as expected?

    I might need to log into your site to help – if you would like me to do that, please send a temporary admin instruction to ryan (at) vextras.com and I’ll get on that for you right away ??

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Running &resync=1 and then cli seems to work, but..’ is closed to new replies.