Limited Support
Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.
We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!
Merry Christmas and Happy Holidays! 🎄
Does anyone have any experience with wpforo creating DB deadlocks? Specifically I'm running into it deadlocking on the wpforo_phrases table.
Its trying to run an INSERT IGNORE, I get the error 'Waiting for table level lock' and then it continues to run, quickly filling up DB connections. I have no other code interacting with the wpforo_phrases table, just the plugin. I do have the polls addon, no other addons.
Any insight would be awesome. I've repaired and recreated the table. It seems to happen at random times , but once the first deadlock occurs, it spirals quickly.
It is not frequent and I can usually solve be completely stopping and starting my DB server, but thats far from ideal
If it helps - I've isolated it to this section of code in the Phrases.php file.
if( $langid ) {
foreach( $vals as $val ) {
if( isset( $val['tag'] ) && $val['tag'] == 'PHRASE' && isset( $val['attributes']['NAME'] ) && trim( (string) $val['attributes']['NAME'] ) && isset( $val['value'] ) && trim( (string) $val['value'] ) ) {
$sql = "INSERT IGNORE INTO `" . WPF()->tables->phrases . "`
(`phraseid`, `langid`, `phrase_key`, `phrase_value`)
VALUES( NULL,
'" . intval( $langid ) . "',
'" . esc_sql( stripslashes( htmlspecialchars_decode( (string) $val['attributes']['NAME'], ENT_QUOTES ) ) ) . "',
'" . esc_sql( stripslashes( htmlspecialchars_decode( (string) $val['value'], ENT_QUOTES ) ) ) . "')";
WPF()->db->query( $sql );
}
}
return $langid;
}
Nobody has reported something like this. Usually it is some plugin, hard to find. Very hard. I had one issue like that and since it happened once in a while, it was impossible to find the cause.
Luckily someone reported also the same with a plugin i used and after removing it, the issue is gone.
Also is your DB engine version updated?