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

unoconv: Lots of conversions from cron task causes a memory exhaustion

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Component/s: Assignment
    • Labels:
      None
    • Environment:
      Redhat 6
      PHP 5.6
    • Affected Branches:
      MOODLE_31_STABLE

      Description

      A load test which generated a lot of assignment submissions (online text) lead me to find a memory size exhausted error when converting submission to pdf for annotation with unoconv :

      Execute scheduled task: Préparer les travaux remis pour annotation (assignfeedback_editpdf\task\convert_submissions)
      Convert 1 submission attempt(s) for assignment 40539
      ...    
      Convert 1 submission attempt(s) for assignment 40539
      PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 3308123 bytes) in /app/apache2/htdocs/moodle/lib/tcpdf/tcpdf.php on line 8792
      

      I had the error twice. Both times, there was a little more than a thousand submissions converted before the error occured.

      [logs]$ grep -c "Convert" convert_submissions_preprod1.log
      1057
      [logs]$ grep -c "Convert" convert_submissions_preprod2.log
      1082
      

      I guess one solution would be to limit the number of conversion that can be done in one cron task execution.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                8 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated: