2

I have two installs using Mosaico that are hanging up. The latest symptoms seem to be:

  • if let cron start job, nothing in sent and every cron cycle it tries to start again, and never finishes (no "Finished execution" message in scheduler logs)
  • if I brute force the start with "execute now" in scheduled jobs, the first batch of emails are sent, but then nothing the next cron cycle (starts and never finish message in logs). If I "execute now" again, the next batch of emails are sent. Unless I keep manually executing the job, it never finishes
  • intermittently I notice a new mailing job will start in the scheduled jobs log before the next cron cycle runs (without me triggering it) and those do send another batch!
  • the first time this happened a month ago things got a little better when I had the PHP memory limit increased to 295MB per process but it didn't help on the other account.

Hosting service says nothing in mail logs. Don't see anything amiss in apache(?) logs but not too familiar with them. Civi logs show the following message (but not always):

Jan 02 17:50:52  [info] Ignoring exception thrown by nullHandler: , mail() returned failure

Jan 02 17:50:52  [info] $backTrace = #0 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(959): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::nullHandler(Object(PEAR_Error))
#2 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(PEAR_Error))
#3 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(577): PEAR_Error->__construct("mail() returned failure", NULL, 16, (Array:2), NULL)
#4 [internal function](): PEAR::_raiseError(NULL, "mail() returned failure")
#5 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(237): call_user_func_array((Array:2), (Array:2))
#6 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/packages/Mail/mail.php(175): PEAR::__callStatic("raiseError", (Array:1))
#7 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/packages/Mail/mail.php(175): PEAR::raiseError("mail() returned failure")
#8 /home/mainecrafts/www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.flexmailer/src/Listener/DefaultSender.php(85): Mail_mail->send("<kippski@gmail.com>", (Array:11), "--=_29173cf19e4941d68483ae618155e3a9\nContent-Transfer-Encoding: 8bit\nConten...")
#9 [internal function](): Civi\FlexMailer\Listener\DefaultSender->onSend(Object(Civi\FlexMailer\Event\SendBatchEvent), "civi.flexmailer.send", Object(Civi\Core\CiviEventDispatcher))
#10 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func((Array:2), Object(Civi\FlexMailer\Event\SendBatchEvent), "civi.flexmailer.send", Object(Civi\Core\CiviEventDispatcher))
#11 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:1), "civi.flexmailer.send", Object(Civi\FlexMailer\Event\SendBatchEvent))
#12 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php(167): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("civi.flexmailer.send", Object(Civi\FlexMailer\Event\SendBatchEvent))
#13 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch("civi.flexmailer.send", Object(Civi\FlexMailer\Event\SendBatchEvent))
#14 /home/mainecrafts/www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.flexmailer/src/FlexMailer.php(247): Civi\Core\CiviEventDispatcher->dispatch("civi.flexmailer.send", Object(Civi\FlexMailer\Event\SendBatchEvent))
#15 /home/mainecrafts/www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.flexmailer/src/FlexMailer.php(184): Civi\FlexMailer\FlexMailer->fireSendBatch((Array:200))
#16 [internal function](): Civi\FlexMailer\FlexMailer->Civi\FlexMailer\{closure}((Array:200))
#17 /home/mainecrafts/www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.flexmailer/src/Event/WalkBatchesEvent.php(71): call_user_func(Object(Closure), (Array:200))
#18 /home/mainecrafts/www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.flexmailer/src/Listener/DefaultBatcher.php(62): Civi\FlexMailer\Event\WalkBatchesEvent->visit((Array:200))
#19 [internal function](): Civi\FlexMailer\Listener\DefaultBatcher->onWalk(Object(Civi\FlexMailer\Event\WalkBatchesEvent), "civi.flexmailer.walk", Object(Civi\Core\CiviEventDispatcher))
#20 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func((Array:2), Object(Civi\FlexMailer\Event\WalkBatchesEvent), "civi.flexmailer.walk", Object(Civi\Core\CiviEventDispatcher))
#21 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:1), "civi.flexmailer.walk", Object(Civi\FlexMailer\Event\WalkBatchesEvent))
#22 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php(167): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("civi.flexmailer.walk", Object(Civi\FlexMailer\Event\WalkBatchesEvent))
#23 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch("civi.flexmailer.walk", Object(Civi\FlexMailer\Event\WalkBatchesEvent))
#24 /home/mainecrafts/www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.flexmailer/src/FlexMailer.php(221): Civi\Core\CiviEventDispatcher->dispatch("civi.flexmailer.walk", Object(Civi\FlexMailer\Event\WalkBatchesEvent))
#25 /home/mainecrafts/www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.flexmailer/src/FlexMailer.php(186): Civi\FlexMailer\FlexMailer->fireWalkBatches(Object(Closure))
#26 /home/mainecrafts/www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.flexmailer/src/FlexMailer.php(148): Civi\FlexMailer\FlexMailer->run()
#27 [internal function](): Civi\FlexMailer\FlexMailer::createAndRun(Object(CRM_Mailing_BAO_MailingJob), Object(Mail_mail), NULL)
#28 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/Civi/Core/Resolver.php(119): call_user_func_array((Array:2), (Array:3))
#29 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Mailing/BAO/MailingJob.php(198): Civi\Core\Resolver->call("\Civi\FlexMailer\FlexMailer::createAndRun", (Array:3))
#30 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Mailing/BAO/Mailing.php(2959): CRM_Mailing_BAO_MailingJob::runJobs(NULL, NULL)
#31 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(324): CRM_Mailing_BAO_Mailing::processQueue()
#32 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_process_mailing((Array:1))
#33 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#34 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:7))
#35 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Job", "process_mailing", (Array:1), NULL)
#36 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(145): civicrm_api("Job", "process_mailing", (Array:1))
#37 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(113): CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))
#38 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Job.php(153): CRM_Core_JobManager->executeJobById("2")
#39 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(160): CRM_Admin_Page_Job->browse(NULL, NULL)
#40 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Job.php(136): CRM_Core_Page_Basic->run()
#41 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(309): CRM_Admin_Page_Job->run((Array:3), NULL)
#42 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:16))
#43 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#44 /home/mainecrafts/www/www/wp-content/plugins/civicrm/civicrm.php(1216): CRM_Core_Invoke::invoke((Array:3))
#45 [internal function](): CiviCRM_For_WordPress->invoke("")
#46 /home/mainecrafts/www/www/wp-includes/class-wp-hook.php(286): call_user_func_array((Array:2), (Array:1))
#47 /home/mainecrafts/www/www/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#48 /home/mainecrafts/www/www/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
#49 /home/mainecrafts/www/www/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")
#50 {main}

This happened about a month ago on the same account (over 4000 recipients), then a mid-month mailing (about 2000 recipients) went fine.

Any help in resolving this would be great as I'm forcing these to go out in the meantime :/

  • i would suggest removing Mosaico from the title/tags as I think that is a red herring – petednz - fuzion Jan 4 '18 at 4:35
1

Your error is mail() returned failure. That strongly suggests an error outside the PHP stack. Check your SMTP logs; there should be a good clue there. You can also specify an alternate SMTP server if one is available to you.

  • Hosting had reduced my PHP memory limit :/ Now crons are back up to 295MB so hopefully next job should run nicely again. - Thanks! – Karen S Jan 4 '18 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.