• Hello,

    I have a very high activity website and after the latest updates the database kept growing (due to action scheduler + new data being added) from the Automatic Lifetime Value.
    I have disabled it and cleared the action logs as we do not need that (at least the marketing team did not request it).

    Regarding this matter I have two questions:
    1. why isn’t there a warning (like a nag) that this feature is enabled by default and eats resources?
    2. how can I delete all the data that has been already processed? I have unchecked the the box and saved, but the database size is still enormous! (10+ gb)

    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Eduard “RwkY” Doloc

    (@rwky)

    small update
    cleaned my action scheduler but had 100+ in pending, ran that via WP CLI and now I have over 10k of completed (had 0 prior running), apparently they are multipling fast ??

    p.s. the LTV is disabled but I keep getting calculations being done…

    Later edit:
    I have downgraded to 1.35 as after running the action scheduler on CLI it went to over 30k + completed and over 160+ pending.

    Plugin Author alekv

    (@alekv)

    Hi @rwky

    The deactivation checkbox is only for the LTV recalculation on the entire order list. That is the heavy part of it and should only take place once until it is done.

    LTV calculation will still happen on new orders and usually will only take up one task. So that shouldn’t be a problem going forward. Let me know if you think otherwise.

    Yes, the complete recalculation of the LTV can be a big batch. I haven’t seen such a big increase in db size yet. Sorry for the inconvenience caused.

    You can run wp action-scheduler clean --status=failed,complete --batch-size=50 to remove failed and complete tasks through WP CLI.

    You can even run that command to delete pending tasks: wp action-scheduler clean --status=pending --batch-size=50. But be aware that you might also delete pending tasks not from the Pixel Manager. Unfortunately, there is no parameter to specify, only to delete Pixel Manager tasks.

    Regarding the LTV and marketing team. The LTV is sent to Google Ads automatically, and the marketing team might not even know that they are already using it. If they optimize campaigns for new or existing customers, they use it.

    Thread Starter Eduard “RwkY” Doloc

    (@rwky)

    ok, is there a way to disable this function entirely and maybe clean the metadata that was generated? cleaned the action scheduler, but would like to clean the postmeta and other areas that are tied to this LTV function.

    LE: shop has over 200k orders, with around 5-1000 order / day

    Plugin Author alekv

    (@alekv)

    ok, is there a way to disable this function entirely and maybe clean the metadata that was generated?

    Not right now. Why would you want to disable and delete it?

    cleaned the action scheduler, but would like to clean the postmeta and other areas that are tied to this LTV function.

    The Pixel Manager adds one field to the order meta _pmw_order_value. It is small in size and should be an issue for the db.

    Thread Starter Eduard “RwkY” Doloc

    (@rwky)

    Not right now. Why would you want to disable and delete it?

    since the marketing team did not request it + google is not a main channel for them (I’m not even sure we still use google ads on this project) it makes no sense to kill server resources and desync other services (like email, couriers, invoicing, etc., that also work via AS).

    Please add a disable feature, I’ll run a cleanup for that metakey, thank you!

    Plugin Author alekv

    (@alekv)

    @rwky

    I released version 1.37.1 which gives you the option to disable LTV calculation completely. It’s disabled by default, so you only need to install the update.

    Thread Starter Eduard “RwkY” Doloc

    (@rwky)

    @alekv

    Seems to be working as intended! Thank you very much ??

    nb. here is the sql cleanup:


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘the Automatic Lifetime Value killed my site’ is closed to new replies.