← Back to team overview

mahara-contributors team mailing list archive

[Bug 1514608] Re: MySQL deadlock issues with simultaneous users

 

I did a search through the Mahara code base for "db_start()", and found
over 200 places where we use it. Some of these are reasonable, a few SQL
queries together in the same function. Others are quite wide-ranging,
like the collection copy. Or they do things like trigger events before
calling db_commit(), which, depending on the registered event handlers,
can lead to a lot of code getting executed.

That's interesting, those deadlock log files are definitely from the DB
that I was running Mahara against (I made direct DB updates and saw them
reflected in the web application). And the copy task did error out, with
the errors coming from the mysqli driver saying "deadlock": [1213:
Deadlock found when trying to get lock; try restarting transaction]

But perhaps mysqli means something different by "deadlock" than the
MySQL InnoDB engine does? Or maybe there's some kind of logging setting
in this DB that's making it not show up?

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1514608

Title:
  MySQL deadlock issues with simultaneous users

Status in Mahara:
  In Progress
Status in Mahara 1.10 series:
  In Progress
Status in Mahara 15.04 series:
  In Progress
Status in Mahara 15.10 series:
  In Progress
Status in Mahara 16.04 series:
  In Progress

Bug description:
  The patch in Bug 1492919 resolved the deadlock issues for some users,
  but others are still reporting that they are getting deadlocks. This
  seems to be an issue unique to MySQL, and it can happen with as few as
  2 or 3 concurrent users.

  It has been reported across all stable versions. Strangely, it seems
  to be a relatively recent issue (i.e. we never heard this with Mahara
  1.8 or 1.7, etc), so this suggests it was triggered by something that
  changed fairly recently. One possible candidate is our switch to the
  mysqli driver (before that Mahara wasn't doing transactions at all, in
  mysql).

  See also:
  * https://mahara.org/interaction/forum/topic.php?id=7309
  * https://mahara.org/interaction/forum/topic.php?id=7432

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1514608/+subscriptions


References