Database issues: TRUNCATE TABLE wp_cleantalk_ua_bl
-
- Version: 5.160
Hello,
We’re a WordPress host and are experiencing Database performance issue with various customers sites that have the latest version of the
cleantalk-spam-protect
plugin installed and active.It appears there may be a bug, which causes a
TRUNCATE TABLE
sql query on thewp_cleantalk_ua_bl
table to be run every few seconds (or multiple times a second) cause the DB load issues.We’ve partially narrowed it down to these lines of code of the AntiCrawler.php file, where it appears to be originating from:
wp-content/plugins/cleantalk-spam-protect/lib/Cleantalk/ApbctWP/Firewall/AntiCrawler.php 60 public static function update( $file_path_ua ) { 61 62 $file_content = file_get_contents( $file_path_ua ); 63 64 if(function_exists('gzdecode')) { 65 66 $unzipped_content = gzdecode( $file_content ); 67 68 if ( $unzipped_content !== false ) { 69 70 $lines = \Cleantalk\ApbctWP\Helper::buffer__parse__csv( $unzipped_content ); 71 72 if( empty( $lines['errors'] ) ){ 73 74 $result__clear_db = self::clear_data_table( \Cleantalk\ApbctWP\DB::getInstance(), APBCT_TBL_AC_UA_BL ); [...]
- From reading the code it appears that it’s fetching some path, unzipping etc, and if no failures are detected then it calls the TRUNCATE every time.
Which the
self::clear_data_table(
function gets called on LINE 74 & ultimately does the$db->execute( "TRUNCATE TABLE {$db__table__data};" );
table sql queries we’re seeing in high volume.For current database performance mitigations, we’ve resorted to downgrading the plugin on customer sites to the previous
5.159.9
version. Which has stabilized the performance of the database clusters back to normal.—
We were wondering, if this is a known bug or if there would be way to mitigate it by updating a plugin setting to stop the TRUNCATE queries from occurring?
Or if we could assist further in providing more info.
- The topic ‘Database issues: TRUNCATE TABLE wp_cleantalk_ua_bl’ is closed to new replies.