← Back to team overview

mahara-contributors team mailing list archive

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

 

Thanks Russell. I'm completely new to JMeter, so having that test plan
to start from should save me a lot of time!

Unfortunately I didn't think to check "show engine innodb status" after
running that deadlock (because I figure I could tell from the PHP errors
which query it had died on and that was enough). And since then I have
dropped that database. I'll make sure to check the next time the problem
happens, though. Or perhaps I'll turn on that innodb_print_all_deadlocks
setting it mentions in the MySQL manual.

>From reading what the MySQL manual has to say about deadlocks, it seems
like our underlying problem in Mahara is that we're doing the entire
collection copy operation inside of a transaction. And that copy
operation may take a while, depending on how many pages and how much
content is in the collection, the speed of the DB connection, and
whether it requires copying files in dataroot as well. Just having a
long-running transaction makes it a lot more likely that we'll hit
deadlock problems.

Although it's strange to me, because I have not heard of any deadlock
problems with Mahara in Postgres. Instead, the site tends to just slow
down under heavy usage. Although perhaps that's Postgres being willing
to wait longer for the deadlock to clear?

Once I'm able to replicate this with JMeter I'll explore some possible
solutions. The most "brute-force" one would be to disable transactions
entirely (maybe with a config-defaults.php option), if this actually is
a problem caused by long-running transactions.

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

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