Moodle
  1. Moodle
  2. MDL-10318

SCORM 1.7.x to o 1.8.1 upgrade requires huge memory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.3
    • Component/s: SCORM
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      Enviromnent:
      Moodle 1.7.x with about 200 users and 5 courses. Each course has it SCORM activiry with about 150-200 attempts each.
      php.ini with memory_limit set to 32MB, beyond the minimum Moodle memory requirment

      Problem:
      when trying to upgrade to 1.7.1, all modules upgrades smootly except SCORM, which tries to allocate about 96MB of memory for php.

      Workaround:
      temporarily increase the memeory_limit of php to 128MB or more. This workaround cannot work for those people who can't access the php.ini.

      Should probably better to solve the problem allowing an upgrade needing lesser memory.

        Gliffy Diagrams

          Activity

          Hide
          Andrea Bicciolo added a comment -

          Errata corrige:
          The sentence:
          "Problem:
          when trying to upgrade to 1.7.1..."

          should be read
          "Problem:
          when trying to upgrade to 1.8.x..."

          Sorry!

          Show
          Andrea Bicciolo added a comment - Errata corrige: The sentence: "Problem: when trying to upgrade to 1.7.1..." should be read "Problem: when trying to upgrade to 1.8.x..." Sorry!
          Hide
          Petr Skoda added a comment -

          Hi, many parts of moodle require much more than 32MB, minimum memory is now higher.

          Moodle tries to raise the memory limit automatically when required, unfortunately it is common on hosted servers that the memory limit can not be changed from PHP which is a major problem - we can not work around it.

          Also the latest versions of PHP5 do a different math when calculating the used memory, that is why you need to increase the memory limit anyway.

          Show
          Petr Skoda added a comment - Hi, many parts of moodle require much more than 32MB, minimum memory is now higher. Moodle tries to raise the memory limit automatically when required, unfortunately it is common on hosted servers that the memory limit can not be changed from PHP which is a major problem - we can not work around it. Also the latest versions of PHP5 do a different math when calculating the used memory, that is why you need to increase the memory limit anyway.
          Hide
          Andrea Bicciolo added a comment -

          Thanks Petr.

          Just a question, don't you think 96-128MB is a little too high as a memory limit?

          Show
          Andrea Bicciolo added a comment - Thanks Petr. Just a question, don't you think 96-128MB is a little too high as a memory limit?
          Hide
          Petr Skoda added a comment -

          The problem is that the developers are not testing the code with memory restriction enabled. Most developers work for organizations with large installations where memory is not a problem, I agree that we should at least try to keep the required memory low.

          The limit itself is not a problem, the problem is that hosting companies do not allow raising it temporarily for operations that need it (such as cron and upgrades). The memory limit feature in PHP was IMHO designed to prevent problems caused by broken scripts, web hosting companies are using it for something else.

          Show
          Petr Skoda added a comment - The problem is that the developers are not testing the code with memory restriction enabled. Most developers work for organizations with large installations where memory is not a problem, I agree that we should at least try to keep the required memory low. The limit itself is not a problem, the problem is that hosting companies do not allow raising it temporarily for operations that need it (such as cron and upgrades). The memory limit feature in PHP was IMHO designed to prevent problems caused by broken scripts, web hosting companies are using it for something else.
          Hide
          Roberto Pinna added a comment -

          The problem is that the developer never test it's code on production server so he always uses few memory during update.

          I modified the way I used in last upgrade. The new way should use less memory.

          Please let me know.

          Roberto.

          PS:(in italian) Come al solito grazie della segnalazione Andrea

          Show
          Roberto Pinna added a comment - The problem is that the developer never test it's code on production server so he always uses few memory during update. I modified the way I used in last upgrade. The new way should use less memory. Please let me know. Roberto. PS:(in italian) Come al solito grazie della segnalazione Andrea
          Hide
          Dan Marsden added a comment -

          Andrea - did you get a chance to test this recently? - can we close this?

          thanks,

          Dan

          Show
          Dan Marsden added a comment - Andrea - did you get a chance to test this recently? - can we close this? thanks, Dan
          Hide
          Dan Marsden added a comment -

          closing as Fixed - Roberto mentions that he had made some changes to the upgrade script.

          Show
          Dan Marsden added a comment - closing as Fixed - Roberto mentions that he had made some changes to the upgrade script.

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: