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 »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Stuck mailings and canceling
Pages: [1]

Author Topic: Stuck mailings and canceling  (Read 1090 times)

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Stuck mailings and canceling
February 23, 2011, 10:38:57 am
I'm having a strange problem with my most recent mailing.  I fear I've made a mess of things and could use some help cleaning it up.

Last night Mailing 1 got stuck after 190 successful deliveries.  Nothing I could find online or think of myself did any good, and no emails were sent for over 2 hours (while cron was firing every 10 minutes.)

Eventually I gave up.  I cancelled Mailing 1, made a new group of the successful deliveries, and created Mailing 2 which excluded the successful deliveries of Mailing 1.

Mailing 2 got stuck after 254 successful deliveries.

Here's the weird part.  When Mailing 2 got stuck, Mailing 1 started back up again, even though I had cancelled it.  Mailing 1 has been running fine and is nearing completion.

I'm not happy that 254 people probably got the email twice, but I guess it could be worse.  Specifically, it would be worse if Mailing 2 starts back up again when Mailing 1 completes.  I can/will disable the cron job to prevent this, but I need some help on how to clean out the queue and restore civiMail to some kind of ground state.

Any advice is appreciated.

« Last Edit: February 23, 2011, 11:34:05 am by kmarkley »

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Stuck mailings and canceling
February 23, 2011, 02:30:55 pm
Ok.  I have disabled cron with all but the last couple emails of Mailing 1 sent (I very much want to avoid sending people multiple emails).

Now I need to reset civiMail so I can turn cron back on and start clean on the next one.

Any suggestions?  I could mark both mailings as complete - will that prevent any more emails going out on these mailings?  Or do I need to prune or alter the civicrm_mailing_job and/or civicrm_mailing_event_queue tables?

I thought about redirecting mail to dev/null and letting them run out, but that would prevent transactional emails as well.

I could really use some help on this.

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: Stuck mailings and canceling
February 24, 2011, 05:11:12 pm

i would do the foll in the db (if u r unsure of what civimail would do)

Basically deleting mailing 1 and 2 in the DB should cascade down and delete the jobs and entries in the event queue table. Check in the DB to make sure. Do a backup before you do the above deletes

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

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Stuck mailings and canceling
February 24, 2011, 08:38:29 pm
@kmarkley,

You might be a victim of CRM-7452 "Cancelling a mailing should cancel all child jobs".

Each Mailing has a Parent Job, and 1 or more Child jobs. If you cancel a Mailing, only the Parent mailing job gets cancelled, while the Child jobs do not. This problem is fixed in 3.4.

To see if this is the case, look in 'civicrm_mailing_job' and find any jobs that have a 'status' of 'Running'. See which are related to your mailings by matching on the 'mailing_id' column. 'Cancel' any jobs you think should not be 'Running'.

Ken

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Stuck mailings and canceling
February 25, 2011, 08:20:18 am
Thank you for your help.

I did indeed find un-cancelled jobs in civicrm_mailing_jobs, which is curious since I'm running 3.3.5 and CRM-7452 was fixed for 3.3.4.  I have set their status to cancelled. 

I guess the plan is to re-activate cron and see if that does the trick. If not, follow lobo's advice to delete the mailings from civicrm_mailing.

Question: If I disable outbound mail from the global settings, will any emails go to dev/null, or will it throw an error?  When I turn cron back on, I would like to have temporarily disabled emails so none get sent even if the mailing starts up again.


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: Stuck mailings and canceling
February 25, 2011, 10:29:07 am

check:

http://wiki.civicrm.org/confluence/display/CRMDOC33/Civi-Cheat-Sheet (search for: Redirecting email output)

u'll need to keep a valid outbound email setting

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

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Stuck mailings and canceling
February 25, 2011, 11:05:30 am
Ah, thanks for the link.  This setting is effective regardless whether outbound email is using smtp, mail(), or sendmail?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Stuck mailings and canceling

This forum was archived on 2017-11-26.