Neverending database updates | WordPress.org

[ad_1]

👋 hi there @squelch

Thanks for reaching out about this. From what I gather, it is related with the issue reported here.

Kindly note, it has already been fixed with this Pull Request (PR), and is planned for release with WooCommerce version 9.0.0.

As for updating the WooCommerce database, the Action Scheduler is supposed to take care of that under normal circumstances.

I hope this is helpful! Please let us know if you have any further questions or concerns.
We will be happy to help you further.

Hey @anastas10s,

Thanks for the reply but I don’t think the two things are linked. I have also seen that issue where the update buttons don’t work (which is a secondary source of frustration that I decided not to pollute my question with).

Here, when I click the button, it does initialize the database update with the 3 actions I mentioned appearing in the action scheduler. But despite those actions being executed over and over and over WooCommerce still nags for a database update. I’ve run the update easily 50 times and it’s still prompting to update. I ended up leaving this running on the command line:

while [ 1 ] ; do wp action-scheduler run ; wp wc update ; sleep 1 ; done

and it produces this output over and over and over:

Found 7 scheduled tasks
Started processing action 149724
Completed processing action 149724 with hook: woocommerce_run_update_callback
Running 7 actions  14 % [==========================>                                                                                                                                                                ] 0:00 / 0:00Started processing action 149728
Completed processing action 149728 with hook: woocommerce_run_update_callback
Started processing action 149725
Completed processing action 149725 with hook: woocommerce_run_update_callback
Started processing action 149729
Completed processing action 149729 with hook: woocommerce_run_update_callback
Started processing action 149726
Completed processing action 149726 with hook: woocommerce_run_update_callback
Started processing action 149730
Completed processing action 149730 with hook: woocommerce_run_update_callback
Started processing action 149727
Completed processing action 149727 with hook: woocommerce_update_db_to_current_version
Running 7 actions  100% [===========================================================================================================================================================================================] 0:00 / 0:00
1 batch executed.
Success: 7 scheduled tasks completed.
Success: No updates required. Database version is 8.9.1

When I visit the Scheduled Actions tab in WooCommerce I see those same 3 tasks that I previously mentioned being generated over and over. These two screenshots were taken roughly 30 seconds apart and look almost identical:

Screenshot 1

Screenshot 2

Notice how the scheduled times have moved on but they are the exact same set of neverending tasks. The script I mentioned before has been running for an hour with no change in this behaviour.

Having said all that I’ve just found that the update nag doesn’t seem to be appearing outside of the WordPress dashboard and the WooCommerce settings pages, so maybe it is part of the GitHub issue you linked to…

Hello Matt Lowe

Thank you for your detailed reply.

Could you share your site’s System Status Report?
I understand this is a public platform and you are not comfortable with sharing SSR here.
Therefore, I suggest using https://quickforget.com to share the SSR.

The issue you are facing likely is the same as previously suggested.
I can review the SSR and investigate this further.

Looking forward to your response. 🙂

Best regards.

Hi @doublezed2,

Thanks for getting back to me. I can’t share the SSR in any kind of a public forum as this is a customer website. If you can provide an email address I can forward it to I can share the system status report that way, but not within any kind of a public setting. ‘Quick Forget’ isn’t a good solution as it can still be accessed publicly, even if not for long or only for a specific number of requests — I cannot guarantee the data only goes to the person it should go to and so I cannot trust such a solution. I hope you can understand that my customers’ security and privacy always has to come above all other considerations.

Also, mysteriously, I’ve just visited the customer’s website to see if I could maybe anonymise the SSR as an alternative and, would you believe it, while I was away:

“WooCommerce database update complete. Thank you for updating to the latest version!”

I have to wonder whether a cron event executed in the meantime that fixed whatever was preventing it from completing.

There’s probably little mileage in keeping this ticket open at this point as we can only speculate, so I’ve marked it as resolved. I’ll wait to see if the PR mentioned earlier resolves this issue (assuming it’s going into the next release?) when I next update this particular site.

Thanks for your help @anastas10s and @doublezed2.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer