• 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: 1060

    Error 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.

    https://www.ads-software.com/plugins/wordfence/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I came from a pretty big company that ran a similar setup as you do. We used hyper-db and never had this problem. There should be a link on the options page to view your database tables. Can you do that and check for all the tables with wf in the name to see if there are dupes there or not?

    tim

    Thread Starter techsurgeons

    (@techsurgeons)

    Thanks for the response.

    HyperDB is different enough in that it mostly solves scaling problems, not availability ones. It would still be vulnerable to replication issues.

    There are no duplicated tables, the error I mention is referring to the -attempted- creation of the permanent column on the wfBlocks table when it already exists.

    How do you know you never saw these error messages? What DB clustering scheme did they use? And again, of all the plugins our clients run on their sites, only Wordfence has these issues.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wordfence doesn't play nice with clustered MySQL/MariaDB’ is closed to new replies.