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 (Moderator: Dave Greenberg) »
  • Civi Log Location - Cron?
Pages: [1]

Author Topic: Civi Log Location - Cron?  (Read 1147 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
Civi Log Location - Cron?
April 20, 2013, 09:48:29 pm
I just had some really strange behavior with Cron running randomly and sending out random automatic reminders.   I just upgraded to 4.3.1.

I have Logging enabled in Civi but am not sure if Cron activity is logged, or if there is a way to find out when and by whom reminders or cron was initiated?  I checked the log files under  /var/www/sites/default/files/civicrm/ConfigAndLog however it doesn't seem to have much info.

My Drupal log seems to indicate there was a problem at the time, but since it was Civi that sent out the reminder I was hoping there was some more substantial logging I may not know about?

Thanks

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Civi Log Location - Cron?
April 20, 2013, 11:48:30 pm
how are you calling your cron?

you may have a log in the civicrm page /civicrm/admin/job?reset=1

Quote
My Drupal log seems to indicate there was a problem at the time

can you be more specific?

depending on our server access, you might have some other logs - do you have a shell account, etc.?
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

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: Civi Log Location - Cron?
April 21, 2013, 07:55:19 am
Yes I have a shell account.  It runs on a server that we own and manage.

Cron is called automatically by Drupal using a module called CiviCron.  It has worked great in the past.  After further investigation this morning it appears that Cron ran correctly as it was meant to, however instead of emailing only members who's membership end-date is 14 days away, it emailed my entire smart group of several thousand members.

It is almost like Civi partially ran the automatic reminder but decided to not pay attention to the contraints of the reminder.  I had just finished upgrading from 4.2.8 to 4.3.1 and am wondering if something could have happened to cause Civi this momentary stroke.  I am kind of worried this may happen again.

Here is the result of the scheduled jobs log.   What is interesting is that at '2013-04-20 23:13:14' it starts the scheduled reminders job which was the culprit in this, however it doesn't report that it sent out several thousand emails or even finished.


Code: [Select]
Date Job Name Command/Job Status/Additional Information
2013-04-20 23:17:39
Summary
Finishing scheduled jobs execution.
2013-04-20 23:17:39 Participant status processor
0
Summary
Finished execution of Participant status processor with result: Success (

Number of Expired registration(s) = 0
Number of registration(s) require approval = 0
Number of registration changed to Pending from wai (...)
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Participant status processor with result: Success (

Number of Expired registration(s) = 0


Number of registration(s) require approval =  0


Number of registration changed to Pending from waitlist = 0

)
2013-04-20 23:17:39 Participant status processor
0
Summary
Starting execution of Participant status processor
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Participant status processor
2013-04-20 23:17:39 Membership status processor
0
Summary
Finished execution of Membership status processor with result: Success (Processed 3669 membership records. Updated 0 records.)
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Membership status processor with result: Success (Processed 3669 membership records. Updated 0 records.)
2013-04-20 23:17:29 Membership status processor
0
Summary
Starting execution of Membership status processor
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Membership status processor
2013-04-20 23:17:29
Summary
Starting scheduled jobs execution
2013-04-20 23:13:14 Scheduled reminders sender
0
Summary
Starting execution of Scheduled reminders sender
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Scheduled reminders sender
2013-04-20 23:13:14 Participant status processor
0
Summary
Finished execution of Participant status processor with result: Success (

Number of Expired registration(s) = 0
Number of registration(s) require approval = 0
Number of registration changed to Pending from wai (...)
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Participant status processor with result: Success (

Number of Expired registration(s) = 0


Number of registration(s) require approval =  0


Number of registration changed to Pending from waitlist = 0

)
2013-04-20 23:13:14 Participant status processor
0
Summary
Starting execution of Participant status processor
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Participant status processor
2013-04-20 23:13:14 Membership status processor
0
Summary
Finished execution of Membership status processor with result: Success (Processed 3669 membership records. Updated 0 records.)
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Membership status processor with result: Success (Processed 3669 membership records. Updated 0 records.)
2013-04-20 23:13:07 Membership status processor
0
Summary
Starting execution of Membership status processor
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Membership status processor
2013-04-20 23:13:07 Mailings scheduler
0
Summary
Finished execution of Mailings scheduler with result: Success (a:0:{})
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Mailings scheduler with result: Success (a:0:{})
2013-04-20 23:13:07 Mailings scheduler
0
Summary
Starting execution of Mailings scheduler
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Mailings scheduler
2013-04-20 23:13:07 Clean-up Temporary Data and Files
0
Summary
Finished execution of Clean-up Temporary Data and Files with result: Success (empty values!)
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Clean-up Temporary Data and Files with result: Success (empty values!)
2013-04-20 23:13:07 Clean-up Temporary Data and Files
0
Summary
Starting execution of Clean-up Temporary Data and Files
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Clean-up Temporary Data and Files
2013-04-20 23:13:07 Activity processor
0
Summary
Finished execution of Activity processor with result: Failure, Error message: Process Activities failed
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Activity processor with result: Failure, Error message: Process Activities failed
2013-04-20 23:13:07 Activity processor
0
Summary
Starting execution of Activity processor
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Activity processor
2013-04-20 23:13:07
Summary
Starting scheduled jobs execution
2013-04-20 20:12:26
Summary
Finishing scheduled jobs execution.
2013-04-20 20:12:26 Participant status processor
0
Summary
Finished execution of Participant status processor with result: Success (

Number of Expired registration(s) = 0
Number of registration(s) require approval = 0
Number of registration changed to Pending from wai (...)
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Participant status processor with result: Success (

Number of Expired registration(s) = 0


Number of registration(s) require approval =  0


Number of registration changed to Pending from waitlist = 0

)
2013-04-20 20:12:26 Participant status processor
0
Summary
Starting execution of Participant status processor
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Participant status processor
2013-04-20 20:12:26 Membership status processor
0
Summary
Finished execution of Membership status processor with result: Success (Processed 3669 membership records. Updated 0 records.)
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Membership status processor with result: Success (Processed 3669 membership records. Updated 0 records.)
2013-04-20 20:12:20 Membership status processor
0
Summary
Starting execution of Membership status processor
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Membership status processor
2013-04-20 20:12:20 Mailings scheduler
0
Summary
Finished execution of Mailings scheduler with result: Success (a:0:{})
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Mailings scheduler with result: Success (a:0:{})
2013-04-20 20:12:20 Mailings scheduler
0
Summary
Starting execution of Mailings scheduler
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Mailings scheduler
2013-04-20 20:12:20 Clean-up Temporary Data and Files
0
Summary
Finished execution of Clean-up Temporary Data and Files with result: Success (empty values!)
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Clean-up Temporary Data and Files with result: Success (empty values!)
2013-04-20 20:12:20 Clean-up Temporary Data and Files
0
Summary
Starting execution of Clean-up Temporary Data and Files
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Clean-up Temporary Data and Files
2013-04-20 20:12:20 Activity processor
0
Summary
Finished execution of Activity processor with result: Failure, Error message: Process Activities failed
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Activity processor with result: Failure, Error message: Process Activities failed
2013-04-20 20:12:20 Activity processor
0
Summary
Starting execution of Activity processor
Details

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Starting execution of Activity processor
2013-04-20 20:12:20
Summary
Starting scheduled jobs execution

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: Civi Log Location - Cron?
April 21, 2013, 08:04:18 am
I can see that Drupal attempts to run Cron about every 5 minutes and at one point tries to start Civi's cron while it is already running.  I am not sure if this aids in causing Civi to go haywire?

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: Civi Log Location - Cron?
April 21, 2013, 08:40:35 am

the scheduled reminders job does not have locking around it. Which means that multiple jobs can conflict with not-very-good results

Please do file an issue for this. even better, can you take a look and contribute a patch for this. We can help out on IRC. i suspect its a fairly simple patch

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

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: Civi Log Location - Cron?
April 21, 2013, 09:37:19 am

Alright, I will try to file an issue on this today.   I am also trying to figure out why Civi appeared to disregard the timestamps on the contact / membership records and emailed almost every person in my organization. 

Was there any type of date / time modification that occurred in the upgrade to 4.3.1 that might have reset counters or lead to confusion with any existing automatic reminders?   I am going to try and reproduce this on my staging server to see if I can get Civi to send out the same mass email again, or if this was indeed some type of random event.

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: Civi Log Location - Cron?
April 21, 2013, 09:47:44 am

i filed an issue for this here: http://issues.civicrm.org/jira/browse/CRM-12395

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

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: Civi Log Location - Cron?
April 21, 2013, 11:07:34 am

I have restored a newly upgraded (4.3.1) version of my site to my staging server and almost immediately after I login to the site Civi sends out several hundred emails to contacts that have neither an active membership nor any contributions, and it is sending an automatic reminder that is only targeted to send 14 days before membership end date.

I have done this several times now and each time Civi sends out several hundred emails.   

My question is what does Civi look at to determine whether a reminder email has been sent for a specific contact so that it wont send again?   Some of the contacts that are being emailed had memberships that expired more than 1 year ago and yet they are being emailed now as if Civi forgot to email them last year.   Maybe there was breakage in past versions of Civi that is now fixed, but I am at a loss as to what Civi looks at with regards to emailing contacts.

As an example, the first attachment shows one of the contacts that were emailed.
The second image shows the reminder as it is currently setup,
I have also verified the database is correct for the two above items and the date/time on the server is current. 

The only thing I can assume is that Civi doesn't have some sort of flag set that lets it think it needs to send out reminder emails to contacts with past expired memberships?


Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Civi Log Location - Cron?
April 23, 2013, 10:43:30 am
mcgeehon :

Quote
I have done this several times now and each time Civi sends out several hundred emails.
   
this has been fixed for 4.3.2

Here is the patch :

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.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Civi Log Location - Cron?

This forum was archived on 2017-11-26.