Notifications
Clear all

[Closed] Duplicate tables after backup

9 Posts
3 Users
1 Reactions
621 Views
Posts: 49
Topic starter
(@novedddd)
Trusted Member
Joined: 2 years ago

We recently experienced critical issues with my client's site (unrelated to wpforo) and so I resorted to using a full backup restore. Everything seemed to work and function normally after the restore was complete, until I noticed some db errors. The main error that I am seeing is the following:

WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_timeout_wpforo_get_phrases_wp_wpforo_phrases0d67330e40', '1680786452', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`) made by 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, wpforo\\wpforo->init, do_action('wpforo_before_init'), WP_Hook->do_action, WP_Hook->apply_filters, wpforo\\wpforo->change_board, do_action('wpforo_after_change_board'), WP_Hook->do_action, WP_Hook->apply_filters, wpforo\\classes\\Phrases->wpforo\\classes\\{closure}, wpforo\\classes\\Phrases->init, wpforo\\classes\\Phrases->get_phrases, set_transient, add_option

 

I am also seeing duplicate databases, which I assume is not normal?

 

Would duplicate db's be a possible cause of the above error?

 

If that is the case, then how do I know which databases to remove?

 

See screenshot below:

 

Topic Tags
8 Replies
Chris
Posts: 3649
(@chris)
Famed Member
Joined: 3 years ago

Hi @novedd,

Sorry for the late response.

Please Open wp_options table and delete all the rows one by one with _transient_ prefix

1 Reply
(@novedddd)
Joined: 2 years ago

Trusted Member
Posts: 49

@chris  We currently have no rows with the _transient_ prefix within the wp_options table.

 

Any other suggestions that may be causing the "deadlock" error mentioned above?

 

We're also seeing another large deadlock error in addition to the original one I posted above (see attached screenshot)

dimalifragis
Posts: 2615
(@dimalifragis)
Famed Member
Joined: 4 years ago

Apparently @chris missed the duplicate DB issue.

But it seems that your issues came from your RESTORE.

3 Replies
(@novedddd)
Joined: 2 years ago

Trusted Member
Posts: 49

@dimalifragis Correct, the errors are stemming from the restore. I presume that duplicate database files were somehow made during that process. In my opening post above, I had posted a screenshot of the tables. There seems to be identical tables for just about every db table. (wp_wpforo_1 and wp_wpforo_2 etc etc)

wp_wpforo_1_forums

wp_wpforo_2_forums

etc etc..

I assume that is not normal, right?

If anyone can shed light into obvious tables that are true duplicates and need to be deleted, please let me know @chris. Thanks!

Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3649

@novedd,

wp_wpforo_1_forums is wrong, wpForo doesn't have tables with _1 prefix.

wpForo tables by default aren't with any numbers. And if you create a new board, the tables will get the Board ID next to the table name, just like it is in your case: wp_wpforo_2_forums, wp_wpforo_3_forums. But not wp_wpforo_1_forums, 1 is the default with no number.

 

Before doing any action, kill all current SQL transactions.

https://bobcares.com/blog/kill-processlist-mysql/

Your issue is related to the wp_options table, and not related to wpForo. We recommend hiring an SQL specialist as we cannot help you with your SQL issues.

 

(@novedddd)
Joined: 2 years ago

Trusted Member
Posts: 49

Posted by: @chris

@novedd,

wp_wpforo_1_forums is wrong, wpForo doesn't have tables with _1 prefix.

wpForo tables by default aren't with any numbers. And if you create a new board, the tables will get the Board ID next to the table name, just like it is in your case: wp_wpforo_2_forums, wp_wpforo_3_forums. But not wp_wpforo_1_forums, 1 is the default with no number.

 

Before doing any action, kill all current SQL transactions.

https://bobcares.com/blog/kill-processlist-mysql/

Your issue is related to the wp_options table, and not related to wpForo. We recommend hiring an SQL specialist as we cannot help you with your SQL issues.

 

 

1.) So, are you saying that it does indeed appear that I have "duplicate" wpforo database tables, correct? There should only be a "wp_wpforo_forums" table with no number?

 

2.) When you say that my issue is related to the wp_options table, how can you 100 confirm this? How do you know for certain that it's specifically related to the wp_options table? As I mentioned, we currently have no rows with "the _transient_ prefix" within the wp_options table as you originally suggested that we should delete them. But there are no transient tables present.

 

Please advise, thanks.

 

 

Chris
Posts: 3649
(@chris)
Famed Member
Joined: 3 years ago

Posted by: @novedddd

1.) So, are you saying that it does indeed appear that I have "duplicate" wpforo database tables, correct? There should only be a "wp_wpforo_forums" table with no number?

wp_wpforo_forums Default Board

wp_wpforo_2_forums New Created Board(Second Board) not a duplicate.

wp_wpforo_1_forums This is wrong,

change all _wpforo_1_ to _wpforo_forums without 1

 

Posted by: @novedddd

2.) When you say that my issue is related to the wp_options table, how can you 100 confirm this? How do you know for certain that it's specifically related to the wp_options table? As I mentioned, we currently have no rows with "the _transient_ prefix" within the wp_options table as you originally suggested that we should delete them. But there are no transient tables present.

 

Because of this:

Posted by: @novedddd

WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_timeout_wpforo_get_phrases_wp_wpforo_phrases0d67330e40', '1680786452', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`) made by 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, wpforo\\wpforo->init, do_action('wpforo_before_init'), WP_Hook->do_action, WP_Hook->apply_filters, wpforo\\wpforo->change_board, do_action('wpforo_after_change_board'), WP_Hook->do_action, WP_Hook->apply_filters, wpforo\\classes\\Phrases->wpforo\\classes\\{closure}, wpforo\\classes\\Phrases->init, wpforo\\classes\\Phrases->get_phrases, set_transient, add_option

And because of this:

 

 

dimalifragis
Posts: 2615
(@dimalifragis)
Famed Member
Joined: 4 years ago

Do you have the BACKUP you restored? What tables are in there? The same? Are in there also _1 and _2 ?

If you site anything special, like multi - anything?

Also if you do not have more than ONE BOARD defined, there is no _1 or _2 prefix.