Cerber_log mysql table

Not sure where to post, but my hosting account was suspended due to the mysql database taking up too much of the server resources. The cerber_log table appeared to be at fault, beginning with this error:
| 115261504 | bassoons_webUser | localhost | bassoons_execCoaching | Query | 3575 | Waiting for table metadata lock | ALTER TABLE cerber_log CHANGE stamp stamp DECIMAL(14,4) NOT NULL | 0.000 |

Is this common for WP Cerber plug-in to alter the log table? This looks very suspicious to me, like hacking or a MySQL injection.

The SQL request (‘ALTER TABLE cerber_log CHANGE stamp stamp DECIMAL(14,4) NOT NULL’) is completely valid. No bad actors are involved here.

I do not see any reason why it would create difficulties for your hosting provider. Do they really count every single SQL request to a website database?

Hi, I’m having the same problem with my provider, and they have locked my client’s account. I’ve had this happen twice with two different clients. This is the database session information they sent me for the most recent lockout (db names redacted).

| 13353009 | ****************b | localhost | ****************t | Query | 6161 | Waiting for table metadata lock | ALTER TABLE cerber_log CHANGE stamp stamp DECIMAL(14,4) NOT NULL | 0.000 |
| 13353069 | ****************b | localhost | ****************t | Query | 6161 | Waiting for table level lock | INSERT INTO cerber_log (ip, ip_long, user_login, user_id, stamp, activity, session_id, country, deta | 0.000 |
| 13381507 | ****************b | localhost | ****************t | Query | 5297 | Waiting for table metadata lock | SELECT the_id FROM wp_*********2_cerber_sets sets LEFT JOIN cerber_log log
| 13421209 | ****************b | localhost | ****************t | Query | 3978 | Waiting for table metadata lock | DELETE FROM cerber_log WHERE stamp < 1736564889 | 0.000 |
| 13427127 | ****************b | localhost | ****************t | Query | 3823 | Waiting for table metadata lock | ALTER TABLE cerber_log CHANGE stamp stamp DECIMAL(14,4) NOT NULL | 0.000 |
| 13435537 | ****************b | localhost | ****************t | Query | 3599 | Waiting for table metadata lock | INSERT INTO cerber_log (ip, ip_long, user_login, user_id, stamp, activity, session_id, country, deta | 0.000 |
| 13535826 | ****************b | localhost | ****************t | Query | 719 | Waiting for table metadata lock | INSERT INTO cerber_log (ip, ip_long, user_login, user_id, stamp, activity, session_id, country, deta | 0.000 |
| 13539198 | ****************b | localhost | ****************t | Query | 608 | Waiting for table metadata lock | DELETE FROM cerber_log WHERE stamp < 1736568259 | 0.000 |

Seems to me that ALTER TABLE is somehow locking the log table and subsequent updates to the table are also locked. It should be possible to avoid running ALTER TABLE all the time, or at least in a racy way, to avoid the possibility of this issue. I don’t feel comfortable using WP Cerber if there is a possibility of this happening again.

Is this an issue that the developer can address?

Hi! What version of WP Cerber did you encounter this issue with? Also, what is your hosting provider?

Hi Garry, I’m using WP Cerber version 9.6.6 on WordPress 6.7.2, PHP 7.4.33, MariaDB 10.6.21.
The provider is GreenGeeks and they use LiteSpeed server.

The next version of WP Cerber brings an improvement to prevent that from happening.

1 Like

Thanks for the update. Looking forward to the next release!