0

We have a VPS running litespeed with four website frontends on CE 1.9.2.

It is experiencing really inconsistent new order email problems. Sometimes the email goes. Sometimes it doesn't - that's close to 50/50, we then have outliers where the order email sends two or three times.

Most times when the email doesn't send automatically, I can manually queue another email and it will send on schedule, although sometimes I have to do that twice to get a success.

Looking at the exception log on the failures we are getting a fairly generic looking exception:

ERR (3): 
exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. ' in /home/magento/public_html/lib/Zend/Mail/Transport/Sendmail.php:137

Stack trace:
#0 /home/magento/public_html/lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /home/magento/public_html/lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /home/magento/public_html/app/code/core/Mage/Core/Model/Email/Queue.php(239): Zend_Mail->send()
#3 [internal function]: Mage_Core_Model_Email_Queue->send(Object(Mage_Cron_Model_Schedule))
#4 /home/magento/public_html/app/code/core/Mage/Cron/Model/Observer.php(326): call_user_func_array(Array, Array)
#5 /home/magento/public_html/app/code/core/Mage/Cron/Model/Observer.php(72): Mage_Cron_Model_Observer->_processJob(Object(Mage_Cron_Model_Schedule), Object(Mage_Core_Model_Config_Element))
#6 /home/magento/public_html/app/code/core/Mage/Core/Model/App.php(1357): Mage_Cron_Model_Observer->dispatch(Object(Varien_Event_Observer))
#7 /home/magento/public_html/app/code/core/Mage/Core/Model/App.php(1336): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Cron_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#8 /home/magento/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#9 /home/magento/public_html/cron.php(77): Mage::dispatchEvent('default')
#10 {main}

Please help, we have run out of ideas.

  • Just a thought, have you checked the cron_schedule to ensure that there isn't another task pushing the email queue to run too late? You would see "Too late for the schedule" if this was the case. – Eirik Nov 3 '15 at 4:35
  • Do you have check other emails like account register, forgot passoword? If it will not work then the email is not configure at ur server/magento instance – Amit Bera Nov 3 '15 at 8:28
  • All other emails are going as intended, it is only on cronjobs that it is failing and that is at this stage unpredictable. I am going to start logging times of failure etc. Have asked the SA to check contents of cron_schedule as well, hopefully that shows the answer. There are a few jobs running on the 5 minute schedule, and we have it configured as: */5 * * * * www-data /bin/sh /path/to/magento/cron.sh cron.php -m=default */5 * * * * www-data /bin/sh /path/to/magento/cron.sh cron.php -m=always – hoybers Nov 9 '15 at 3:41
0

Thanks for the suggestions guys. It looks like it is now working. In brief, I pushed the cron schedule to run on offset minutes. We had cron configured as */5 * * * * www-data /bin/sh /path/to/magento/cron.sh cron.php -m=default */5 * * * * www-data /bin/sh /path/to/magento/cron.sh cron.php -m=always as suggested in: Which cron script is best to run? cron.php or cron.sh One way or another, with the other jobs running at those times on our VPS or from those two commands interrupting each other, this must've been the cause of our problem. I changed the schedule for job one to 1-59/5 and job two to 2-59/5 and since then, every order email has delivered successfully (and only once which is a bonus).

|improve this answer|||||

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.