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) »
  • Help - Civi Scheduler appears to have gone nuts
Pages: [1]

Author Topic: Help - Civi Scheduler appears to have gone nuts  (Read 1047 times)

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Help - Civi Scheduler appears to have gone nuts
April 23, 2013, 05:17:38 am

I recently upgraded to 4.3.1 only to have Civi send out a scheduled email reminder to members that didn't meet the criteria in the schedule.   I have it set to send out 14 days before membership end date and Civi was sending the email to members who end date was as far as a year out and some who had been expired for over a year.

We took the mailing smtp function offline for a few days and let the cron jobs run hoping that this was something that would work itself out - maybe something needed to reset?

Anyway, I changed the outbound mailer to mail() again last night and once again Civi sent out mass emails to completely random people that don't meet the criteria.   At this point I have had to disable all outbound mailing from Civi and probably cannot use the scheduler until I figure out what is going on.

Any idea's in this area would be great!  I cannot figure out what might have gone wrong for the automatic reminder cron job to start emailing people without concern for the attributes set in the reminder itself?

Thanks

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Help - Civi Scheduler appears to have gone nuts
April 23, 2013, 06:27:18 am
To fill in some of the gaps, here is what I have noticed so far.

  • The Job log (/civicrm/admin/joblog?reset=1) shows that mailings scheduler started but never finished.  Every other scheduled job shows a start and finish, but not the scheduler.  There is a log message stating that "Finishing scheduled jobs execution." even though the scheduler never completed.
  • The reminder that was sent out to almost my entire contact database was the first reminder with the lowest ID number.  None of the others were sent out.
  • This is the second time this has occured.  It seems to only occur late at night or early morning (EST) and sends email to the same people each time.


mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Help - Civi Scheduler appears to have gone nuts
April 23, 2013, 07:35:54 am
I think that the scheduler never finished due to the following php error:

[Tue Apr 23 01:18:14 2013] [error] [client 2600:3c03::f03c:91ff:feae:9c77] PHP Fatal error:  Maximum execution time of 300 seconds exceeded in /var/www/sites/all/modules/civicrm/packages/Mail/mail.php on line 168

This was probably good otherwise more contacts would have been emailed.  This leads to another question as to what a recommended execution time should be for php scripts with respect to Civi?  Should the mailer take more than 5 minutes for a single execution?

I am continuing to look into this and will update this thread with anything I have found in case anyone else runs into a similar problem in the future.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Help - Civi Scheduler appears to have gone nuts
April 23, 2013, 10:52:25 am
Can you apply the following patch and check :
https://github.com/civicrm/civicrm-core/pull/509.patch

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Help - Civi Scheduler appears to have gone nuts
April 23, 2013, 02:12:54 pm

Sure.  let me try to reproduce this on my staging server, and then I will apply the patch and try to reproduce.

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Help - Civi Scheduler appears to have gone nuts
April 28, 2013, 07:54:18 am
Yashoda,

This patch may solve the problem with multiple cron jobs running simultaneously, however it unfortunately did not solve the problem I am experiencing.

After applying the patch, I re-ran the 'send_reminder' job and Civi sent an email to 100% of the contacts in my database.  Luckily I have this on my staging site now, so it was contained. 

I will continue to dig into why this is occurring.

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: Help - Civi Scheduler appears to have gone nuts
April 28, 2013, 10:01:14 am
I had the same problem in 4.3.0 and now again in 4.3.1. My renewal reminders were sent for 30 days before and two weeks after expiration. My members all got about 50-70 renewal notices regardless of their expiration date. I have disabled the whole thing. Any help would be much appreciated.

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Help - Civi Scheduler appears to have gone nuts
April 29, 2013, 12:38:24 pm

Exactly.  We have disabled the entire renewal reminder as well after sending out thousands of erroneous reminders.  I am digging through the SQL queries in hopes of identifying why Civi is incorrectly identifying membership join, start and end dates.


Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Help - Civi Scheduler appears to have gone nuts
April 29, 2013, 02:27:23 pm
Can you let us the exact scenario for which mails were sent?

I wasn't able to replicate on my local sandbox.

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Help - Civi Scheduler appears to have gone nuts
May 04, 2013, 06:10:53 pm
All,

Yashohda helped me solve this problem.  It appeared that somehow I had corruption or erroneous data in my civicrm_action_log table.  I truncated this table, ran cron a couple times once or twice to flush out any remaining emails that had to be sent, cleared all caches and it seems to be working now.

I will continue to watch it for the next few weeks to make sure all is well.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Help - Civi Scheduler appears to have gone nuts

This forum was archived on 2017-11-26.