Support » Plugin: Jetpack by WordPress.com » Jetpack Sync killing the DB

  • Hi,

    Recently we noticed that Jetpack Sync is generating a really long query which is killing our DB.

    KILLED QUERY (24562 characters long generated in wp-content/plugins/jetpack/sync/class.jetpack-sync-queue.php:372): SELECT option_name AS id, option_value AS value FROM wp_options WHERE option_name IN (‘jpsq_full_sync-1472647887.501315-31118-299-54’, ‘jpsq_full_sync-1472647887.501315-31118-299-55’, ‘jpsq_full_sync-1472647887.501315-31118-299-56’, ‘jpsq_full_sync-1472647887.501315-31118-299-57’, ‘jpsq_full_sync-1472647887.501315-31118-299-58’, ‘jpsq_full_sync-1472647887.501315-31118-299-59’, ‘jpsq_full_sync-1472647887.501315-31118-299-6’, ‘jpsq_full_sync-1472647887.501315-31118-299-60’, ‘jpsq_fu….

    When we searched our wp_options table it appeared that we have about 23k entries like that. When I took a look at the option_value for some of these entries, they were referring to posts from 2013. Shouldn’t you remove the old sync entries from the options table?

    Can I improve performance of this functionality in any way? I know that there is a setting for the number of rows it will fetch on each call but couldn’t find that in the admin panel.

    Also, I’m not sure if we are even using this feature (we are using only Jetpack Json API). Can you explain what exactly it does?

    Best
    -Lukasz

    https://wordpress.org/plugins/jetpack/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Ryan Cowles

    (@ryancowles)

    Thanks for the report, and I’m sorry to hear about the trouble! Could you post your site URL here, so I can have a look?

    If you want it to remain private, you can contact us using the form here:
    Contact Support

    Please make sure to include a link to this thread in your message. Thanks!

    We had this same issue recently and have seen this across several sites we host. Jetpack folks were able to resolve it by turning sync off.

    Hi sashman13,

    I couldn’t find any option to disable that. Have they disabled it by removing the cron job event?

    Hi – I have also experienced this issue. I actually had a couple of sites where the database seemed to be malfunctioning on a particular host. I moved it to another host, checked the options table and found thousands of jpsq_sync entries. Deleted those and moved it back to the original host and the site is now fine. However, it’s still gathering jpsq_sync entries at a rate of knots – I cleared it out yesterday and one particular site already has 60 entries again today.

    If there is any solution to this I’d be grateful to know.

    And if it’s possible to turn off Jetpack sync I’d like to know that too – can anyone enlighten me?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    We’re about to release a new version of Jetpack that will address those issues. If you’d like, you can test the upcoming version of Jetpack by installing the Beta plugin from here;
    Jetpack Beta

    Let us know how it goes!

    if it’s possible to turn off Jetpack sync I’d like to know that too – can anyone enlighten me?

    That can’t be done I’m afraid, as sync is used by all the modules that communicate with WordPress.com. To turn off Jetpack sync, you’d have to disconnect Jetpack from WordPress.com and use Jetpack’s Development mode to only use the features that do not require a connection to WordPress.com:
    Home

    Hi Queju,

    They turn it off on the wordpress side I believe as I couldn’t find a way to disable it. I was really close to just rewriting the sync function to bypass it, but then got the response from wordpress.com :

    Thanks for digging into things on your end, and sending me more details 🙂 Yes, I can turn off the sync hook, and I did so right now. Did the errors stop on your end?

    If the errors stopped, we can turn sync back on with settings that would lower the impact on your server (i.e. a small number of things synced at a time and a smaller number of items being sent back to Jetpack at a time). Let me know when a good time to turn it back on would be.

    Sync powers a lot of Jetpack’s features, so some things may not work while Sync is still off.

    As a side note I’m super impressed with the support of Jetpack. Particularly Valerie and Jeremy.

    Here are the traces I took : http://imgur.com/a/Poct0

    • This reply was modified 3 years, 1 month ago by  sashman13. Reason: blockquote
    • This reply was modified 3 years, 1 month ago by  sashman13.

    Thanks Jeremy, I assume that the beta version already has the fix implemented?

    Also, is Jetpack going to continue generating the wp_options ‘sync’ entries? When I remove them after some time I can see that all of them are being re-generated (it’s literally about 26k now).

    Thanks for the info Sashman13,

    I’m actually planning on disabling the sync cronjob by adding a ‘schedule_event’ filter (I can send you a code if you like), but the idea of switching to development mode seems fine too. We are using Jetpack for a couple of features that it provides but we don’t really need sync (as far as I know).

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    I assume that the beta version already has the fix implemented?

    That’s correct.

    is Jetpack going to continue generating the wp_options ‘sync’ entries?

    Yes, but these entries should get cleaned as you go. That’s obviously not working well on your site right now, but 4.3 should help with that. Feel free to install Jetpack Beta and see if it helps!

    I’m actually planning on disabling the sync cronjob by adding a ‘schedule_event’ filter (I can send you a code if you like), but the idea of switching to development mode seems fine too. We are using Jetpack for a couple of features that it provides but we don’t really need sync (as far as I know).

    Something like this could also help, until you get 4.3 on your site:

    add_filter( 'jetpack_sync_listener_should_load', '__return_false' );
    add_filter( 'jetpack_sync_sender_should_load', '__return_false' );

    Which features do you use right now? I’d be happy to confirm whether these features rely on Sync or not.

    Hi i have the same problem. My wp-options database makes 110mo :O For a 50 articles wp it seems pretty heavy.
    I have more that 1 000 entries of ‘jpsq_sync’:
    207629
    jpsq_sync-1472159940.363317-31889-3
    a:5:{i:0;s:15:”added_post_meta”;i:1;a:4:{i:0;i:144…
    no

    Can i remove them ? and how can i solve this problem ?

    st00rk

    (@st00rk)

    i have this problem too, at logs jpsq_sync , site is freezing at pages, open at 5-10 seconds… disable jetpack – all ok
    today update jetpack – nothing changed

    • This reply was modified 3 years ago by  st00rk.
    Plugin Contributor Ryan Cowles

    (@ryancowles)

    @antoinersx @st00rk: Hi there! Could you please start your own thread, as per the Forum Welcome? This will allow us to investigate each issue individually. Please be sure to include your site URL, so we can take a look.

    https://wordpress.org/support/plugin/jetpack#new-post

    Thank you!

    yonatron

    (@yonatron)

    If you set Jetpack to Developer Mode, will it actually delete all the jpsq_sync_... entries from the wp_options table? Or does it just make it safe to manually remove them?

    Plugin Contributor Ryan Cowles

    (@ryancowles)

    @yonatron: I don’t believe so – would you be able to create a new thread, and provide me with a site URL, so we can take a look at the issue?

    If you want it to remain private, you can contact us using the form here:
    Contact Support

    Xaibi Aslam

    (@lahorimela)

    I am having the same issue..

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    @lahorimela Could you please start your own thread, as per the Forum Welcome?
    https://wordpress.org/support/plugin/jetpack#new-post

    It would also be useful if you could let me know your site URL there, so I can take a closer look.
    If you want it to remain private, you can also contact us via this contact form:
    http://jetpack.com/contact-support/

    Thank you!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Jetpack Sync killing the DB’ is closed to new replies.