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

Video.js keeping MySQL connection open

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE

      Description

      If a course section description contains a Video.js player, a database connection will be kept open in a sleeping state to MySQL, for each user viewing the page, for 60-90 seconds at least.

      To reproduce:

      1. Add a media file (tested with mp4) to the description of a course section. Make sure to be using the VideoJS player.
      2. Use a MySQL tool like MySQL Workbench to view active connections to database
      3. In the browser, view the course containing the player
      4. Observe connections to MySQL

      In addition to being able to see the issue directly in MySQL, the webserver log will also have a log entry for a request to the video file, of rougly the same duration as the MySQL connection.

      I have been able to reproduce this on three different installations, one being a completely vanilla 3.3.

      Changing to the HTML5 Video player is a workaround, as it does not exhibit the same behaviour.

      This can be a severe issue if many students access a course containing a video simultaneously because the MySQL server can potentially run out of available connections, until some are released.

        Attachments

          Activity

            People

            • Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              mppraxis mppraxis
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie, Jake Dallimore, Jun Pataleta, Ryan Wyllie, Jake Dallimore, Jun Pataleta, Ryan Wyllie
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: