Batch Sync Products - WHMCS Inventory Sync
Idea shared by Erik Brown - October 23, 2018 at 9:44 AM
A lot of web hosts limit the max execution time of scripts running on their service and the Inventory sync module hits way over most of those limits of around 180 seconds.
Is it possible to change the module to sync the selected products in small batches so it would work in any hosting environment? For example if you were syncing 100 products the script would split the products into 10 groups of 10 to sync so each script would stay under the max execution time. A feature that could be enabled would be sequential or simultaneous sync. Simultaneous would kick off all groups at once and sync the products faster but use more memory and sequential would process the groups one at a time to reduce resource usage.

1 Reply

Reply to Thread
Radic D. Replied
October 27, 2018 at 8:12 AM
Employee Post
At its core, this is actually a WHMCS bug. The sync process itself doesn't push a lot of data, but the WHMCS database is a complete mess. With the proper indexing, the process would take a few seconds. 
In the meantime, you can manually sync X products at a time by excluding ones you don't want to sync.

Reply to Thread