Title: Database errors from Jetpack Sync
Last modified: October 13, 2025

---

# Database errors from Jetpack Sync

 *  Resolved [alexhuchasheva](https://wordpress.org/support/users/alexhuchasheva/)
 * (@alexhuchasheva)
 * [7 months, 4 weeks ago](https://wordpress.org/support/topic/database-errors-from-jetpack-sync/)
 * Hello Jetpack Support team,
 * We’re experiencing recurring database errors related to Jetpack Sync and the 
   WooCommerce batch processor on our site.
 * Here are repeated log entries from our `error_log` file:
 * `[13-Oct-2025 07:58:53 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 [13-Oct-2025
   07:58:53 UTC] WordPress database error Commands out of sync; you can't run this
   command now for query SELECT COUNT(*) FROM wp_jetpack_sync_queue WHERE queue_id
   = 'sync' 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->size, Automattic\
   Jetpack\Sync\Queue\Queue_Storage_Table->get_item_count`
 * These errors appear every few minutes, always involving:
    - `Automattic\Jetpack\Sync\Sender->do_sync`
    - `Automattic\Jetpack\Sync\Queue->is_locked / get_checkout_id / size`
    - and occasionally overlap with `Automattic\WooCommerce\Internal\BatchProcessing\
      BatchProcessingController` queries.
 * The issue seems to be triggered during the shutdown hook, which suggests a race
   condition or database connection conflict between Jetpack Sync and WooCommerce’s
   Action Scheduler.
 * **Environment details:**
    - WordPress: latest stable
    - WooCommerce: latest stable
    - Jetpack: latest version (active modules: Sync, Site Stats, Protect)
    - Hosting: Hostinger
    - PHP 8.2
    - No persistent object cache enabled
 * These errors correlate with **periodic CPU spikes**, so I suspect the sync process
   may be looping or locking the DB connection during shutdown.
 * Could you please confirm:
    1. Whether this is a known Jetpack Sync issue or a compatibility problem with the
       new WooCommerce batch processor?
    2. If there’s a way to safely delay or isolate Jetpack’s sync process from running
       on `shutdown_action_hook` to avoid MySQL connection conflicts?
 * Thank you for your help.
 * Best regards,
   **Aleksandra**
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-errors-from-jetpack-sync%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [lastsplash (a11n)](https://wordpress.org/support/users/lastsplash/)
 * (@lastsplash)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/database-errors-from-jetpack-sync/#post-18680779)
 * Hi [@alexhuchasheva](https://wordpress.org/support/users/alexhuchasheva/) –
 * This happens from time to time, and it has been logged by our development team.
 * In past situations, adding this code snippet (either via your theme’s `functions.
   php`, a plugin like Code Snippets, or a functionality plugin has resolved the
   issue for customers:
 *     ```wp-block-code
       add_action( 'shutdown', 'wordpress_check_database_connection', 0 );function wordpress_check_database_connection() {    global $wpdb;    $wpdb->check_connection();}
       ```
   
 * Please add the snippet above and let us know if you continue to see the issue.
 *  Plugin Contributor [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/database-errors-from-jetpack-sync/#post-18689870)
 * Hello [@alexhuchasheva](https://wordpress.org/support/users/alexhuchasheva/),
 * 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!

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

The topic ‘Database errors from Jetpack Sync’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * Last activity: [7 months, 2 weeks ago](https://wordpress.org/support/topic/database-errors-from-jetpack-sync/#post-18689870)
 * Status: resolved