Wordfence doesn't play nice with clustered MySQL/MariaDB
-
Howdy WFBrian and everyone.
I work at a hosting company and we like and recommend Wordfence. However, Wordfence has a bug with how it mucks with the wfBlocks table that yields the below error.
The error is:
[ERROR] Slave SQL: Error ‘Duplicate column name ‘permanent” on query. Default database: ‘wp_<databasename>’. Query: ‘alter table wp_wfBlocks add column permanent tinyint UNSIGNED default 0’, Internal MariaDB error code: 1060Error code 1060 is: ER_DUP_FIELDNAME
(This is different than https://www.ads-software.com/support/topic/duplicate-column-name-permanent#post-7086071)
Our hosted database is a three server MariaDB Galera cluster running the latest stable version 10.0.19. One server receives all the write requests. (It’s a master-master-master cluster, but having a single master handling writes lessens the risk of a conflict.)
My guess as to what is happening is that Wordfence sends multiple “alter table” commands to the master, which it in turn sends to the other, the other servers may process them in a different order and when they reconcile, the conflict occurs.
This error only occurs with Wordfence. The client’s other plugins don’t seem to matter – some run W3TC, WP SuperCache, no caching. It runs the gambit.
It’s not a frequent error, but it is a possibly dangerous one.
- The topic ‘Wordfence doesn't play nice with clustered MySQL/MariaDB’ is closed to new replies.