CRM-720 CiviMail can't process multiple jobs

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: CiviMail
    • Labels:
      None

      Description

      In a situation where multiple jobs are queued, e.g.:

      mysql> select start_date,end_date,status from civicrm_mailing_job;
      -------------------------------------------------

      start_date end_date status

      -------------------------------------------------

      2006-01-16 08:20:15 2006-01-16 08:20:35 Complete
      2006-01-19 02:32:18 NULL Running
      NULL NULL Scheduled
      NULL NULL Scheduled

      -------------------------------------------------

      the function deliver() is called by runJobs() (both routines in CRM/Mailing/BAO/Job.php). This fails causing

      PHP Fatal error: Class 'CRM_Mailing_BAO_Mailing' not found in /var/www/public_html/civimail/modules/civicrm/CRM/Mailing/BAO/Job.php on line 166

      because the following line is missing in deliver() – see attached Jobs.patch:

      require_once 'CRM/Mailing/BAO/Mailing.php';

      But then, when the required code is included, it blows up badly:

      Out of memory (Needed 8164 bytes)
      FATAL: emalloc(): Unable to allocate 35 bytes
      [Tue Jan 24 00:24:26 2006] [error] [client 64.81.61.16] Premature end of script headers /var/www/public_html/civimail/index.php

        Attachments

          Activity

          [CRM-720] CiviMail can't process multiple jobs
          Fen Labalme added a comment -

          We were running with a corrupted database when we saw this problem; after fixing the database we have not been able to reproduce it. So this may be "not a bug".

          Nonetheless, I'm not sure if the function deliver() is ever being called, because if it was, I think we'd see the "Class 'CRM_Mailing_BAO_Mailing' not found" issue, and thus the included patch is needed. Without a better tracing/debugging capability (the worst thing about PHP develiopment, IMO) I can't tell for sure.

          Piotr Szotkowski added a comment -

          Thanks for the patch, I applied it in r4572.

          Could you clarify whether this resolves this bug, or whether I should research the emalloc() error?

            People

            • Assignee:
              Piotr Szotkowski
              Reporter:
              Fen Labalme

              Dates

              • Created:
                Updated:
                Resolved: