• Resolved Lyk

    (@lyk-1)


    Hello,

    I have noticed that the wp_options tables is flooded with entries:
    wc_facebook_background_product_sync_job_
    followed by an id.

    eg: wc_facebook_background_product_sync_job_0002255060670c4e99a173afe7659c11

    Running:

    SELECT COUNT(*) FROM wp_options WHERE option_name LIKE 'wc_facebook_background_product_sync_job_%'

    returns 263.054 entries and the number keeps increasing slowly.

    As a result, enabling the plugin seems to spike the mysql process cpu usage because queries like the following are pretty slow (3+ seconds) :

    SELECT COUNT(*) FROM wp_options WHERE option_name LIKE 'wc_facebook_background_product_sync_job_%' AND ( option_value LIKE '%\"status\":\"queued\"%' OR option_value LIKE '%\"status\":\"processing\"%' )

    Can I disable the plugin and safely delete these entries?
    Why is this happening?
    I have updated to the latest version of the plugin and there are about 3.000 products.

    Thank you!

    • This topic was modified 3 years ago by Lyk.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Bartosz B. a11n

    (@bartoszbudzanowski)

    Hi @lyk-1,

    What was the previous version of the plugin you have been using, the one before you did the update? Since version 2.6.0 the plugin has included a daily task that cleans out the old finished jobs. It does it by eliminating around 250 jobs a day. So if you have a large number it should take some time to clean things out. From what you are saying you have a very large number of old jobs and the 250 entries deleted per day may not be fast enough.

    The other thing that may be happening is that for some reason on your site the entries are created abnormally often – this would suggest issues of a different sort.

    Either way, it is safe to remove the entries even without disabling the plugin as long as you are targeting only the completed jobs with the status “completed”.
    This should speed up the other queries.

    After removing the completed entries please observe the DB and check if the cleanup code is able to remove the completed entries daily.

    I hope that this helps,
    Bartosz

    Thread Starter Lyk

    (@lyk-1)

    Hello Bartosz,

    Thank you for your reply.

    Not 100% which version it was, but it was definitely not a very recent one. It was an old site recently migrated to our control with quite a few issues.

    I see, so I will just clean them manually since 250 a day will definitely not be enough.

    Thank you!

    Plugin Support Bartosz B. a11n

    (@bartoszbudzanowski)

    Great, I am glad that I could help.

    I am marking the thread as resolved,

    Cheers,
    Bartosz

    BASit Bulbulia

    (@basitbulbulia)

    @lyk-1 and @bartosz

    I have 600K rows in my database with these entries ! How and what command do I use to delete them all – Please supply MySql query command to delete in phpmyadmin

    Hello @basitbulbulia ,

    I do not have any example MySQL code at the moment to delete these data using PHPMyAdmin.

    Since this thread is resolved please create a new thread and refer to this one so that we can help you properly on your particular case.

    Thank you ??

    Thread Starter Lyk

    (@lyk-1)

    @basitbulbulia

    something like this should work:

    DELETE FROM wp_options WHERE option_name LIKE 'wc_facebook_background_product_sync_job_%'

    wp_options must be your options tables and it could have a different prefix, eg fPe83k_options

    but make sure you verify it yourself before proceeding and backupup your database.

    Plugin Support nathvi V. a11n

    (@nathvi)

    Thanks @lyk-1 !

    @basitbulbulia Do try the code previously added, we do recommend creating a full backup before modifying the DataBase.

    If you still encounter a problem, please start a new thread so we can keep things organized with one issue at a time.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Multiple db entries with wc_facebook_background_product_sync_job_’ is closed to new replies.