1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Regular deadlock server errors

Discussion in 'Troubleshooting and Problems' started by Stuart Wright, Nov 10, 2014.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    I'm getting a batch of these types of errors several times a day.
    Had 30 of them an hour ago:
    Could I have some advice on how to track down the culprit please?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    I see reference to XenDebug in the trace.
    Is that an add-on?

    It's possibly not the reason but it would be useful to know what it is.
  3. HWS

    HWS Well-Known Member

    If you use a Master/Master replication in MySQL (such as Galera) and a load balancer (such as HAProxy) for database access you see such errors frequently. The reason is that Galera is not 100% transaction safe.

    The solution would be to install digitalpoints genious master/slave add-on and direct all write queries to just one of the MySQL servers. The read queries can still be distributed over all MySQL servers.
  4. Xon

    Xon Well-Known Member

    Serializable transactions aren't supported(http://galeracluster.com/documentation-webpages/isolationlevels.html) but MySQL's default transaction isolation level is repeatable read. XenForo doesn't appear to change this.

    MariaDB is working on a new MySQL proxy (MaxScale) which will do this sort of thing but with configurable policy.
  5. HWS

    HWS Well-Known Member

    Stuarts problem has nothing to do with that.

    This is the problem with Galera;
    If this happens, XenForo shows the error message from the first post.

    See also:
    Xon likes this.
  6. Mike

    Mike XenForo Developer Staff Member

  7. HWS

    HWS Well-Known Member

    Looks like the same error. Haven't seen that thread.

    If Stuart uses Galera (which I assume given his forum size, but do not know), this can be tested easily with disabling the load balancer temporarily.

    We've a Galera setup and saw such errors even at our smaller forum several times a day. Since we changed the setup to just use one node for writing at a time, the errors are gone.
  8. Stuart Wright

    Stuart Wright Well-Known Member

    Sorry chaps. Could the two threads be merged, perhaps?

Share This Page