Plugin Author
gioni
(@gioni)
Hi! That’s correct. In case of a multisite with numerous websites, the daily cron task can cause heavy database load. Handling daily tasks for such cases will be improved in the next release.
Plugin Author
gioni
(@gioni)
A new version with protection from invoking multiple simultaneous cron tasks: https://my.wpcerber.com/downloads/wp-cerber.7.9.6.zip
A new release will be uploaded on wordpress.org in a week.
I was waiting for the release of the plugin to update it on production. Version 7.9.7 was released today.
After looking at the code, I didn’t notice any changes that were made to prevent the problem from happening again.
Please tell me what edit in the code (you can link to the revision in SVN) should solve this problem.
Thanks.
Plugin Author
gioni
(@gioni)
You don’t need to look at the code. Just install the latest version.
We’ve just got the same lock with the latest plugin version. Hosted under AWS Aurora (MySQL) and Beanstalk Multi-site version with HyperDB enabled.
|
| 877151 | dbuser | xxx.xxx.xxx.xxx:33466 | dbname | Query | 60542 | Waiting for table level lock | OPTIMIZE TABLE cerber_log |
| 877152 | dbuser | xxx.xxx.xxx.xxx:33468 | dbname | Query | 60542 | Waiting for table metadata lock | OPTIMIZE TABLE cerber_log |
| 877492 | dbuser | xxx.xxx.xxx.xxx:39848 | dbname | Query | 59013 | Waiting for table metadata lock | INSERT INTO cerber_log (ip, ip_long, user_login, user_id, stamp, activity, session_id, country, deta |
| 877494 | dbuser | xxx.xxx.xxx.xxx:36054 | dbname | Query | 58983 | Waiting for table metadata lock | INSERT INTO cerber_log (ip, ip_long, user_login, user_id, stamp, activity, session_id, country, deta |
…
Plugin Author
gioni
(@gioni)
@evinak Make sure that the tables are set to use the InnoDB engine.
mysql> SHOW TABLE STATUS WHERE Name
= ‘cerber_log’;
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+---------------------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+---------------------+
| cerber_log | InnoDB | 10 | Compact | 0 | 0 | 16384 | 0 | 49152 | 0 | NULL | NULL | NULL | NULL | utf8_general_ci | NULL | | Cerber activity log |
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+---------------------+
1 row in set (0.00 sec)
Plugin Author
gioni
(@gioni)
@evinak Try setting innodb_table_locks=0 in MySQL configuration