Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-10691

Whwn a global role other than admin is assigned, login takes up to 15 MINUTES with 99% cpu for mysqld

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.9
    • Component/s: Roles / Access
    • Labels:
      None
    • Environment:
      SUSE Linux 10 (Also had problem on Red Hat Enterprise Linux 4), MySQL 5, PHP 5.1 (also on PHP 4.4)
    • Database:
      MySQL
    • URL:
      estudy.wiltscoll.ac.uk
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      This is on the Wiltshire College site, where they have been using Moodle since 2003. We recently (about a week ago) upgraded their site from Moodle 1.6.4 to 1.8.2+. They have a large site, with ~1800 courses and many thousands of users.

      When using 1.6.x, they had 153 users that were set up with the course creator right. Upon upgrade to 1.8.2+, all of these users now have the course creator legacy role assigned globally (this was done automatically by the upgrade). This seems to cause an IMMENSE slowdown of the login process, so that the login for a single user with this global role assigned takes between fourteen and fifteen minutes. That is not a typo - 15 MINUTES, not seconds. I sat there and watched. All that time, mysqld was hitting between 97% and 99% on the CPU. This is on a brand new rack-mount IBM server with two hyper-threading 3GHz Xeon processors, 4GB RAM and a SCSI RAID system. And with no other users online.

      On top of that, if you log on as an administrator and try to remove the global role from just ONE of those 153 users, Moodle takes about ten MINUTES and loads of maxed-out mysqld cpu before it finishes and you get control back. Once that has been done, the user can log in as normal. Add the role back and you get another bout of maxed-out cpu for ten minutes or so.

      I was going to try this with one of the teacher roles assigned as a global role, to see if it was any global role (other than admin) or just the Course Creator one, but everything had taken so long that we ran out of time.

      Logging in as an administrator takes about two seconds.

      So I'm guessing that something is seriously wrong here - either a problem with the database, or a bug somewhere.

      Paul Duff and Mark Thompson at Wiltshire College would be happy to allow remote access if someone needed to take a look at the system.

      cheers

      Sean K

        Attachments

          Activity

            People

            • Assignee:
              lazyfish Yu Zhang
              Reporter:
              keoghs Sean Keogh
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08