Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19462

Deadlock with vBulletin server and replication

    XMLWordPrintable

Details

    Description

      I have a vBulletin server running (v4.2.5), with PHP 7.1. They were running on the 10.1 version from the apt repositories from Debian (mariadb-server-core-10.1/stable 10.1.38-0+deb9u1).

      I decided to upgrade the MariaDB using the MariaDB apt repo, which gave me an upgrade to 10.3.14.

      The database is replicated onto another server with the same OS / MariaDB version from stratch (Debian 9 / MariaDB 10.3).

      Replication works fine :

      MariaDB [(none)]> show slave status \G
      *************************** 1. row ***************************
                      Slave_IO_State: Waiting for master to send event
                         Master_User: replication_user
                       Connect_Retry: 10
                     Master_Log_File: master1-bin.000319
                     Read_Master_Log_Pos: 56225430
                       Relay_Log_Pos: 56223609
                  Relay_Master_Log_File: master1-bin.000319
                    Slave_IO_Running: Yes
                   Slave_SQL_Running: Yes
      

      Now, whenever someone opens multiple threads in a very short time range, they will likely be facing a "Database error". As an admin, I can see what the error is, and I can guarantee that this wasn't present when the database used was MariaDB 10.1.

      I opened a thread on the vBulletin support, but they told me there shouldn't be any issues on this type from the version I'm using, and they don't test every MariaDB version so they can't confirm the problem.

      Is any help possible here ?

      Here is the error I'm getting when it occurs :

      Invalid SQL:
      REPLACE INTO forum_ipdata
          (rectype, userid, contentid, contenttypeid, dateline, ip, altip)
      VALUES
          ('view', 13574, 121872, 2, 1556868134, '82.64.xxx.xxx', '82.64.xxx.xxx');
       
      MySQL Error   : Deadlock found when trying to get lock; try restarting transaction
      Error Number  : 1213
      Request Date  : Friday, May 3rd 2019 @ 09:22:14 AM
      Error Date    : Friday, May 3rd 2019 @ 09:22:15 AM
      Script        : http://mysuperforum/threads/123456-any-thread
      Referrer      : 
      IP Address    : xx.xx.xx.xx
      Username      : Wobak
      Classname     : vB_Database_MySQLi
      MySQL Version : 10.3.14-MariaDB-1:10.3.14+maria~stretch-log
      Server        :  xx.xx.xxx.xx
      User Agent    :
      

      (I masked the IPs)

      Tables are running in InnoDB for almost all the tables (the issue also occured when they were in MyISAM).

      Could this be due to replication ?
      Is there anything I can provide to help fix this ?

      Thanks,

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Wobak Thibaut Perrin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.