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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Unable to get backtrace from failing scheduled job
Pages: [1]

Author Topic: Unable to get backtrace from failing scheduled job  (Read 482 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Unable to get backtrace from failing scheduled job
September 22, 2012, 07:46:18 pm
The scheduled job named "Scheduled reminders sender" is failing.

I can see the following in its job log:
Code: [Select]
Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Scheduled reminders sender with result: Failure, Error message: DB Error: no such field

 I have show backtrace and debug turned on in my environment, but there is nothing useful in the log file. Just the following:
Sep 22 15:51:19 [info] Beginning processQueue run: 0, 0

Sep 22 15:51:19 [info] Ending processQueue run


Any ideas on how to debug this further?
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Unable to get backtrace from failing scheduled job
September 23, 2012, 12:49:19 am
Sarah:

Can you try and replicate a similar scenario on our demo http://demo.civicrm.org/

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

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Unable to get backtrace from failing scheduled job
September 23, 2012, 07:52:52 am
The scheduled job works fine on the demo server.
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Unable to get backtrace from failing scheduled job
September 28, 2012, 03:27:22 pm
I have made a little bit of progress in that I have identified the failing SQL statement:

Code: [Select]
INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT r.assignee_contact_id as contact_id, e.id as entity_id, 'civicrm_activity' as entity_table, 2 as action_schedule_id
FROM civicrm_activity e
INNER JOIN civicrm_contact c ON c.id = r.assignee_contact_id
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = r.assignee_contact_id AND
reminder.entity_id          = e.id AND
reminder.entity_table       = 'civicrm_activity' AND
reminder.action_schedule_id = 2
WHERE e.activity_type_id IN (14) AND e.status_id IN (1) AND  e.is_current_revision = 1  AND  e.is_deleted = 0  AND r.assignee_contact_id IN (11833) AND c.is_deleted = 0 AND reminder.id IS NULL AND DATEDIFF(DATE('20120928181427'),'2012-09-21') = 0

But I am not sure what PHP class/function is generating this SQL.
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Unable to get backtrace from failing scheduled job
October 10, 2012, 05:46:48 am
Sarah :

I am not able to replicate the above behavior.

It looks like your query is missing an INNER JOIN on civicrm_activity_assignment which is present in my local sandbox.

Were you able to replicate this on 4.2.2 as well?

-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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Unable to get backtrace from failing scheduled job

This forum was archived on 2017-11-26.