HPOS “Sync X pending order(s)”
-
Several weeks ago, I was able to successfully enable HPOS. For the first day or two, I left “Enable compatibility mode…” enabled, and then disabled compatibility mode after everything appeared to be working. While debugging a different issue, I noticed that when a new order is received, the message/hyperlink “Sync X pending order(s)” appears below the “Enable compatibility mode” checkbox. When clicking the hyperlink, the message, “Currently syncing orders…” appears and subsequently completes. Also, in the left menu bar, I have two “Orders” entries under WooCommerce. I’ve searched for anyone else reporting this, but haven’t found relevant information, so I’d like help debugging the problem.
-
Hi @harleec,
The “Sync X pending order(s)” message is expected behavior when you have enabled HPOS with compatibility mode. It is a feature that ensures that all your orders are correctly synced. However, it should disappear after the synchronization process is completed. More info: https://woo.com/document/high-performance-order-storage/
I hope this clarifies your concern. If you have any other questions, feel free to ask.
Hi @shameem,
After the initial sync, I enabled HPOS and disabled compatibility mode (which is still disabled). However, the “Sync X pending order(s)” message continues to appear when new orders are received. Here’s a screenshot of the settings: https://snipboard.io/ug2sEl.jpg. I just clicked the ‘Sync orders’ again after one order popped up as needing to be synced. I also see two “Orders” in the left menu bar: https://snipboard.io/80lTj4.jpg.
I used the information in the link that you sent to initially setup HPOS, and I’m pretty confident that I followed the steps. At this point, I’m not sure what else to try.
Hi,
I have the same problem:
I think it’s definitely synchronized, but it comes back sometimes…Best regards
Hey, @harleec!
However, the “Sync X pending order(s)” message continues to appear when new orders are received.?
This is expected. If the compatibility mode is disabled, this will show there and it will give you the option to manually sync.
Note:?Turning the?Enable compatibility mode (synchronizes orders to the posts table)?setting off and on will also schedule the backfill process again if needed.
https://woo.com/document/high-performance-order-storage/#section-3I hope this was clarifying. Please let us know if you have other questions.
?I also see two “Orders” in the left menu bar:?https://snipboard.io/80lTj4.jpg.
Thanks for the screenshot!
This can be caused by a theme or plugin conflict. Before running a conflict test, can you please share your System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support, so we can take a look?
Looking forward to your reply.
Have a wonderful day!
—
Hey, @joy0114!
Per WordPress forum guidelines, would you mind opening up a new thread for this so that we can keep things organized and offer more personalized support for you? We’ll be happy to help you out with this over there!
Have a wonderful day!
Hi @carolm29
This is expected. If the compatibility mode is disabled, this will show there and it will give you the option to manually sync.
When HPOS is activated and Compatibility mode is deactivated, what are we supposed to do with the information that “X orders are not synced”? Should they be synchronized or not? Why does this information exist / what is its purpose? It’s not clear.
Thanks.
- This reply was modified 8 months ago by meniscus1.
In my previous response, I thought the “Sync X pending orders” only reappeared when new orders were received, but I’m noticing that it occurs even when new orders are not received. It almost seems like there’s outstanding orders that didn’t get sync’ed during the initial sync process. It doesn’t feel like this is expected behavior.
You’re right, that’s exactly what I noticed on my side.
At the end of the day, yesterday, I sync’ed the pending orders. This morning, after receiving 10 new orders overnight, the message shows “Sync 31 pending orders” (https://snipboard.io/0oLZsl.jpg). Woo team: please convince me that this is expected behavior. Otherwise, I’d like some help debugging this issue.
Hi @harleec,
When you see this message, it means that the sync process hasn’t yet synced some or all new orders. Don’t worry, this is expected behavior, and the message should disappear once the syncing process complete.
If you’d like to speed up the syncing process, please click on this; if not, wait until the scheduled action runs and complete the syncing process.
More info can be found here:
- https://github.com/woocommerce/woocommerce/wiki/High-Performance-Order-Storage-Upgrade-Recipe-Book#initial-sync-of-orders
- https://rudrastyh.com/woocommerce/high-performance-order-storage.html
- https://woo.com/document/high-performance-order-storage/#section-3
- https://developer.woo.com/2022/09/29/high-performance-order-storage-backward-compatibility-and-synchronization/#synchronization
I hope this provides some clarity. Please let us know if you have any other questions!
Hi @shameemreza,
I appreciate the links, but it’s all the same information that doesn’t answer the question as to why orders are waiting to be synced. If I only have HPOS enabled, which means that the initial synced was successful, why do orders need to be synced, and to where? I believe this issue is causing side effects, such as with the Woo Shipping plugin not updating the status to Completed after creating a shipping label. My website has been operational for two years, and I never had an issue with the Woo Shipping plugin until now. As for your comment that “the message should disappear once the syncing process completes,” the count of pending orders never decreases unless I manually click the link. Is it the “action_scheduler_run_queue” that should be performing the syncing?
Hi @harleec,
The syncing process should be happening automatically in the background, and the “Sync X pending order(s)” message should disappear once all orders have been synced. However, it sounds like this might not be happening correctly on your site.
The
wc_run_batch_process
is the task that should be performing the syncing. If this task is not running correctly, it could explain why you’re seeing theSync X pending order(s)
message persistently. More info: https://woo.com/document/high-performance-order-storage/#section-3To diagnose this further, it would be helpful if you could check the status of the
wc_run_batch_process
task. You can do this by going to WooCommerce > Status > Scheduled Actions. If the task is not running as expected, you might see it listed as “Failed” or “Pending”.You can also try using a plugin like WP Crontrol or Advanced Cron Manager to check if any WP Cron-related issues persist that might delay the execution of the scheduled action.
Additionally, I suggest checking if you have any orders that are still in progress. Once all orders are complete, the synchronization should be carried out correctly.
As another workaround, go to WooCommerce > Status > Tools and Delete the custom orders tables. Once done, start the
wc_run_batch_process
again and see whether it helps or not.Let us know how that goes. Looking forward to helping you.
Hi @harleec,
I’m marking this topic as “resolved” due to recent inactivity. If more assistance is needed, feel free to post back here or open a new topic.
Thanks!
I have the exact same issue on both of the sites where I’ve enabled HPOS. I sync, the sync message disappears, the HPOS radio button is active again (and selected), then when a new order comes in, the sync message appears again.
@harleec did you get this resolved?
@zade No, I still have the problem since I haven’t had time to try Shameem’s suggestion of deleting the custom orders table. For now, I have compatibility mode enabled, which is obviously not what I want. I was never able to get a clear answer why (and to what table) new orders need to be synced. The whole purpose of HPOS is to isolate the orders table from WP, so what is there to sync? Anyway, I’m glad to hear that I’m not the only one struggling with this issue. I held off enabling HPOS on my 2nd site until I have time to debug this one.
As I mentioned earlier, the
wc_run_batch_process
task is responsible for performing the syncing. If this task is not working correctly, it could indeed result in the persistent “Sync X pending order(s)” message.The purpose of the syncing process in HPOS is to ensure that all your orders are stored correctly in the new custom orders table, separate from the default WordPress tables. This helps improve the performance of your site by reducing the load on your WordPress database.
If you haven’t already, I’d recommend following my previous advice and checking the status of the
wc_run_batch_process
task in WooCommerce > Status > Scheduled Actions. If the task is listed as “Failed” or “Pending”, this could indicate a problem.Also, consider using a plugin like WP Crontrol or Advanced Cron Manager to check for any WP Cron-related issues that could be delaying the execution of the scheduled action.
Furthermore, deleting the custom orders tables in WooCommerce > Status > Tools, and then running the
wc_run_batch_process
again, might help resolve your issue.If none of these suggestions work, please get back to us with more details so we can assist you further.
- You must be logged in to reply to this topic.