• Resolved cogdog

    (@cogdog)


    My WordPress site has been continually getting hung of on database connection errors. After checking all plugins, removing a few old ones, running repairs, my php error logs are full of these type of errors:

    [27-Jul-2026 08:02:34 UTC] WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM wp_options WHERE option_name = ‘jpsq_sync_checkout’ made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\Jetpack\Sync\Sender->do_sync, Automattic\Jetpack\Sync\Dedicated_Sender::spawn_sync, Automattic\Jetpack\Sync\Queue->is_locked, Automattic\Jetpack\Sync\Queue->get_checkout_id

    I have no idea what to do with this information, except stop using Jetpack. Help?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Josh (a11n)

    (@vitkory)

    Howdy @cogdog ,

    These errors happen when another process on your site leaves a database query unfinished during shutdown, and then Jetpack Sync tries to run its queries on that same connection. The errors look alarming but they’re not causing data loss – they can prevent Jetpack Sync from completing though, which affects features like Stats.

    We have a documented fix for this. You’ll need to add a small code snippet to your site that resets the database connection before Sync runs. The snippet and instructions are in our troubleshooting guide here:

    https://jetpack.com/support/getting-started-with-jetpack/fixing-jetpack-connection-issues/

    You’ll find the specific snippet in that guide here: Database Errors from Jetpack Sync

    Let us know if that helps.

    Thread Starter cogdog

    (@cogdog)

    Thanks Josh,

    I am adding the code to my site now.

    Plugin Support Josh (a11n)

    (@vitkory)

    Howdy @cogdog – sounds good! Please, let us know if this works for you.

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hello @cogdog,

    Do you have updates about that, do you still need help? We usually close inactive threads after one week of no movement, but we want to make sure we’re all set before marking it as solved. Thanks!

    Thread Starter cogdog

    (@cogdog)

    Thanks Stef, My issues have been clear. My database issues ended up being some SQL injection attempts that took up the connectivity. I have added the extra code, but have not seen the sync issues anymore. Close away and thanks for help.

    Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Thanks for letting us know!

    We are marking this thread as resolved. If the errors turn up again, please start a new topic and we will pick it up from there.

    Best,

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.