• Thank you for the useful plugin ??

    The plugin encounters a fatal out of memory error when I navigate to the setting page of it.
    I realized that it’s because we had over 6000 subscribers which needed to be synchronized. maybe you have to query only the post IDs instead of whole complete Objects when getting the number of unsynchronized Orders.
    I solved the problem by limiting the numberposts arg in woo_ml_get_untracked_orders function in functions.php of the plugin.

    one other problem was the synchronization was taking so long. so I decided to increase WOO_ML_SYNC_UNTRACKED_ORDERS_CYCLE to 50.
    the Firefox tab also freezes on synchronization process.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thanks for the feedback Salar.

    Do you know which memory limit is set on your server?

    Additionally could you set increasing the limit to e.g. 256M? see https://docs.woocommerce.com/document/increasing-the-wordpress-memory-limit/

    Indeed the synchronization might take longer depending on the amount of orders to be synchronized. Anyway the script should be able to run as long as possible. It might conflicted with the “max_execution_time” setting on your server or simply froze because your site went down due to the memory limit as well.

    I have 512MB in memory and still get this error…

    Just debugging this on a client site and 512MB is also running out of memory here. Will have a run at the woo_ml_get_untracked_orders fix proposed above and see if this gets it. If I can find a solution to this, will post it ??

    Its a pretty big store the one I’m on, so if this plugin cycles through all orders, that would make sense to me.

    Okay setting the woo_ml_get_untracked_orders function to have 'numberposts' => 50, worked for this. Obviously, this will mean that not all orders are scanned through, though in this site, that number is more than 20,000 orders.

    Probably this wants to be processed in batches, rather than all at once, on the settings page load?

    Thread Starter Salar Gholizadeh

    (@salar6990)

    @robscott set woo_ml_get_untracked_orders ‘numberposts’ => 1000 and WOO_ML_SYNC_UNTRACKED_ORDERS_CYCLE to 50

    then in setting page you can sync 20000 with 20 times pressing sync button and waiting for each itteration to finish.

    @salar6990 thanks very much. In the case of the site in question, we ended up replacing this plugin, but your solution posted did help to get things running along. Thanks for posting this alternative solution too – am sure someone will run into this issue and want to just “get it done” ??

    For the author – I think the solution will be to process in batches, in the background using cron or similar. The memory limit is hit because large number of orders are being scanned and processed in one hit.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Out of memory Error’ is closed to new replies.