Duplicate Primary Key Error with Percona Cluster

  • Filter
  • Time
  • Show
Clear All
new posts

  • Duplicate Primary Key Error with Percona Cluster

    We recently setup our database with a Galera Cluster.
    I have been getting the following errors every few hours:
    Duplicate entry 'XXXXXXX' for key 'PRIMARY'

    This occurs with a number of tables, all using InnoDB.

    We are using 3 machines in our cluster.
    a. Master
    b. Master
    c. Backup - in case a SST is needed or the other two go down.

    wsrep_auto_increment_control is ON.
    innodb_autoinc_lock_mode is set to 2 (as the Percona documentation says this is mandatory).

    What is causing it?
    What can we do about it, without using only one Database for writes?

    Thanks is advance.

  • #2
    I have the same issue with the same architecture.
    Did you find the source of your problem or a workaround?


    • #3
      Can you show an example of such transaction together with table definition? And paste my.cnf. Do you use any MyISAM tables?