CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • CiviMail has stopped sending mails on upgrade to 4.3
Pages: [1]

Author Topic: CiviMail has stopped sending mails on upgrade to 4.3  (Read 2699 times)

osarusan

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7.26
  • MySQL version: 5.4.13
  • PHP version: 5.5.31
CiviMail has stopped sending mails on upgrade to 4.3
May 14, 2013, 07:04:51 am
I recently upgraded from CiviCRM 4.2.7 to 4.3 and am now having a problem with the mailer.

Previously we had it so that every hour, when drupal's cron is run, it also runs the CiviMail cron to send messages.
The cron still exists, and according to the Scheduled Tasks page, the cron is properly being run every hour. However, no mails are being sent, and no errors appear in the log.

Oddly, when I manually run the task from that page, the mails go out. As it stands, right now I have to manually process the job every hour for it to work.
How can I get it to resume sending mails when the task is run automatically?

Thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviMail has stopped sending mails on upgrade to 4.3
May 14, 2013, 09:06:29 am

can u try the changes recommended here and see if that fixes it.

http://forum.civicrm.org/index.php/topic,27945.msg122162.html#msg122162

please report back either way

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

osarusan

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7.26
  • MySQL version: 5.4.13
  • PHP version: 5.5.31
Re: CiviMail has stopped sending mails on upgrade to 4.3
May 14, 2013, 12:15:04 pm
Hi Lobo,

I checked all three of those permissions and they are all correct. They haven't changed since before I upgraded, when it was working fine. I just tested it again, and the cron job "runs" automatically, but no mails get sent.



---

Just to add something else that I just noticed -- when I run the scheduled jobs from a URL (by visiting http://[SITEROOT]/sites/all/modules/civicrm/bin/cron.php?name=username&pass=password&key=site-key), it works correctly and the mails send. It's only when I use the CiviCRM Cron Module for Drupal that the scheduled job runs without actually sending any mails.

Also, strangely, using a cron job to hit the URL (such as */5 * * * * wget -O /dev/null -q -t 1 "http://<domain>/sites/all/modules/civicrm/bin/cron.php?name=<name>&pass=<pass>&key=<key>") runs the cron, but does not mail anything, exactly like the Drupal module. Any idea why it only works when I hit the URL or manually execute them?
« Last Edit: May 14, 2013, 01:12:03 pm by osarusan »

osarusan

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7.26
  • MySQL version: 5.4.13
  • PHP version: 5.5.31
Re: CiviMail has stopped sending mails on upgrade to 4.3
May 16, 2013, 12:54:33 pm
I've tried re-installing CiviCRM and upgrading to 4.3.3 as well, but still no luck after a full day of trying. I've only been able to get mails to send when I manually run the scheduled job. Using a cron causes the jobs to say that they have been run, but no mails send.

Do you have any other ideas of what it could be?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviMail has stopped sending mails on upgrade to 4.3
May 16, 2013, 01:03:59 pm

if the exact cron command runs via the brower but not via the cron tab, it basically means that civi is getting something different when sent via the cron tab

you might want to check the apache logs to see what the crontab is sending to the browser

finally might want to just wrap the cron line in a small sh/bash file and execute that file. Gives you a bit more control

if it still does not work, might be worth hiring someone to take a look. i suspect its a quick easy syntax-like fix

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviMail has stopped sending mails on upgrade to 4.3
May 16, 2013, 06:15:41 pm

most likely:

http://issues.civicrm.org/jira/browse/CRM-12648

is the issue

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

osarusan

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7.26
  • MySQL version: 5.4.13
  • PHP version: 5.5.31
Re: CiviMail has stopped sending mails on upgrade to 4.3
May 20, 2013, 06:11:18 am
Hi Lobo,

Thanks very much. I think you're right, that sounds exactly like the problem.
I'll use your solution with the bash file for now until 4.3.4 gets released.

Thanks for your attention and rapid work on this problem!

megaw

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
    • TMA
  • CiviCRM version: 4.3.4
  • CMS version: drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.x
Re: CiviMail has stopped sending mails on upgrade to 4.3
June 12, 2013, 07:01:16 pm
Can anyone who has upgraded to 4.3.4 verify this fix is working?

 I plan to upgrade this weekend and run some tests and will report back if no one else beats me to it.

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Re: CiviMail has stopped sending mails on upgrade to 4.3
July 29, 2013, 03:39:31 pm
I upgraded to 4.3.5 and our cron mailings failed with a memory error. 
After a moment of inspiration I copied my site php.ini into civicrm/bin and it looks like the mailings are going out OK now.
The cron cmd I use is
wget -O - -t 1 "<sitename>/sites/all/modules/civicrm/bin/cron.php?name=<user>&pass=<pass>&key=<civicrmkey>"

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: CiviMail has stopped sending mails on upgrade to 4.3
July 30, 2013, 01:27:09 am
Hi,

I'd be very surprised if copying the php.ini is what solved the problem, likely a coincidence.

The best way to avoid these memory problem/timeout in my experience is to run the crons via the cli, as php-cli can have a different setting than the normal mod_php/cgi

For that, you need to have an ssh access and being able to set up a cronjob for your apache user (www-data), so not available for everyone.


X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Re: CiviMail has stopped sending mails on upgrade to 4.3
July 30, 2013, 04:47:21 pm
Hmm.  Almost every time I've done a civicrm upgrade I've had trouble getting the cron jobs to run afterwards.  I did use cli at some time in the past, I think cli worked for me with civi 3.4 and an earlier version of php, but not since civi 4 and the php upgrade.

This is what I tried with my current setup:

the same command that I used with drupal 6 and civi 4.2.8
wget -O - -t 1 "<mysite>/sites/all/modules/civicrm/bin/cron.php?name=<uname>&pass=<pass>&key=<key>"
Allowed memory size of 33554432 bytes exhausted (tried to allocate 77824 bytes) in sites/all/modules/civicrm/CRM/Contact/BAO/Query.php on line 1739

something else that had worked at some point in the past
cd public_html/sites/all/modules/civicrm; php -c bin/php.ini bin/cron.php name=<name> pass=<pass> key=<key>
Sorry, could not locate bootstrap.inc

the same cli command that I had used successfully prior to civi 4.2.8, with an older php
cd public_html; php sites/all/modules/civicrm/bin/cli.php -u <uname> -p <pass> -e Job -a execute
Fatal error:  cli.php can only be run from command line. in sites/all/modules/civicrm/bin/cli.class.php on line 82

I do not have ssh access unfortunately, my hosting provider is very security conscious.

The first command (wget) was successful after copying php.ini into civicrm/bin.  My php.ini has a memory limit of 1000M so I am guessing cron.php must use another php.ini somewhere which I have not found yet.

Anyway, my cron mail jobs were all processed successfully so I guess I'm good until the next upgrade.   :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • CiviMail has stopped sending mails on upgrade to 4.3

This forum was archived on 2017-11-26.