Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to Jetpack 5.3 causing database deadlocks #7770

Closed
kevinlisota opened this issue Sep 9, 2017 · 3 comments
Closed

Upgrading to Jetpack 5.3 causing database deadlocks #7770

kevinlisota opened this issue Sep 9, 2017 · 3 comments
Assignees
Labels
[Package] Sync [Pri] High [Type] Bug When a feature is broken and / or not performing as intended

Comments

@kevinlisota
Copy link

I have attempted to upgrade from Jetpack 5.2.1 to 5.3. Both times, the new version is bringing down our site and making it unresponsive.

The debug log has many database deadlock errors when this happens, all related to Jetpack. Here are a few.

I had to rollback to 5.2.1. Any thoughts on a solution to this?

[09-Sep-2017 14:13:06 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM gw_wp_options WHERE option_name = 'jetpack_sync_full__params' made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, Jetpack::activate_new_modules, do_action('updating_jetpack_version'), WP_Hook->do_action, WP_Hook->apply_filters, Jetpack_Sync_Actions::do_initial_sync, Jetpack_Sync_Actions::do_full_sync, Jetpack_Sync_Module_Full_Sync->start, Jetpack_Sync_Module_Full_Sync->reset_data, Jetpack_Sync_Module_Full_Sync->clear_status, Jetpack_Options::delete_raw_option

[09-Sep-2017 14:13:41 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query UPDATE gw_wp_options SET option_value = 'a:5:{s:7:"options";b:1;s:9:"functions";b:1;s:9:"constants";b:1;s:5:"users";a:1:{i:0;i:0;}s:15:"network_options";b:1;}' WHERE option_name = 'jetpack_sync_full__params' made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, Jetpack::activate_new_modules, do_action('updating_jetpack_version'), WP_Hook->do_action, WP_Hook->apply_filters, Jetpack_Sync_Actions::do_initial_sync, Jetpack_Sync_Actions::do_full_sync, Jetpack_Sync_Module_Full_Sync->start, Jetpack_Sync_Module_Full_Sync->update_status_option, Jetpack_Options::update_raw_option

[09-Sep-2017 14:14:08 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT IGNORE INTO gw_wp_options ( option_name, option_value, autoload ) VALUES ( 'jetpack_sync_full__params', 'a:5:{s:7:"options";b:1;s:9:"functions";b:1;s:9:"constants";b:1;s:5:"users";a:1:{i:0;i:0;}s:15:"network_options";b:1;}', 'no' ) made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, Jetpack::activate_new_modules, do_action('updating_jetpack_version'), WP_Hook->do_action, WP_Hook->apply_filters, Jetpack_Sync_Actions::do_initial_sync, Jetpack_Sync_Actions::do_full_sync, Jetpack_Sync_Module_Full_Sync->start, Jetpack_Sync_Module_Full_Sync->update_status_option, Jetpack_Options::update_raw_option

[09-Sep-2017 14:12:49 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM gw_wp_options WHERE option_name = 'jetpack_sync_full__params' made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, Jetpack::activate_new_modules, do_action('updating_jetpack_version'), WP_Hook->do_action, WP_Hook->apply_filters, Jetpack_Sync_Actions::do_initial_sync, Jetpack_Sync_Actions::do_full_sync, Jetpack_Sync_Module_Full_Sync->start, Jetpack_Sync_Module_Full_Sync->reset_data, Jetpack_Sync_Module_Full_Sync->clear_status, Jetpack_Options::delete_raw_option

@kraftbj kraftbj added [Package] Sync [Pri] High [Type] Bug When a feature is broken and / or not performing as intended labels Sep 13, 2017
@kevinlisota
Copy link
Author

I also saw this error in Jetpack 5.4. Upgrading to Jetpack 5.4 caused database deadlocks, bringing down our site.

I did manage to resolve this by temporarily disabling the object cache. We use the object cache in conjunction with Redis using this plugin https://wordpress.org/plugins/redis-cache/

Upgrading from Jetpack 5.2.1 to either 5.3 or 5.4 caused database deadlocks when the object cache was enabled. This is what I did.

  1. Disable object cache
  2. Upgrade to Jetpack 5.4
  3. Re-enable object cache

It seems there is some issue during an upgrade when object caching is enabled. That issue seems to go away if you upgrade without the object cache enabled. I haven't explored why this would be the case.

@oskosk
Copy link
Contributor

oskosk commented Apr 5, 2018

Closing, as a few releases have come out since the issue was reported. @kevinlisota please feel free to reopen if this can still be reproduced.

@tiagorodriguesdev
Copy link

The problem persists. Jetpack + Redis won't work as it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Sync [Pri] High [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

9 participants