Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-63168

cronjob fails on a daily basis at core_message\task\migrate_message_data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.1, 3.6
    • Fix Version/s: 3.5.5, 3.6.3
    • Component/s: Messages, Tasks
    • Labels:

      Description

      Hi,

      my cronjob throws an error every day that the adhoc task: core_message\task\migrate_message_data cannot be executed correctly.

      The log says:

      {{... started 09:53:53. Current memory use 42.1MB.}}
      {{ Database transaction aborted automatically in core_message\task\migrate_message_data}}
      {{ ... used 16 dbqueries}}
      {{ ... used 0.0096261501312256 seconds}}
      {{ Adhoc task failed: core_message\task\migrate_message_data,Fehler beim Schreiben der Datenbank}}
      {{ Debug info:}}
      {{ Duplicate entry '2961-41589-2' for key 'mdl_messuseracti_usemesact_uix'}}
      {{ INSERT INTO mdl_message_user_actions (userid,messageid,action,timecreated) VALUES(?,?,?,?)}}
      {{ [array (}}
      {{ 0 => '2961',}}
      {{ 1 => 41589,}}
      {{ 2 => 2,}}
      {{ 3 => '1506800176',}}
      {{ )]}}
      {{ Backtrace:}}

      Execute adhoc task: core_message\task\migrate_message_data

      • line 1329 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      • line 239 of /message/classes/task/migrate_message_data.php: call to mysqli_native_moodle_database->insert_record()
      • line 151 of /message/classes/task/migrate_message_data.php: call to core_message\task\migrate_message_data->migrate_message()
      • line 90 of /message/classes/task/migrate_message_data.php: call to core_message\task\migrate_message_data->migrate_data()
      • line 185 of /lib/cronlib.php: call to core_message\task\migrate_message_data->execute()
      • line 74 of /lib/cronlib.php: call to cron_run_inner_adhoc_task()
      • line 61 of /admin/cli/cron.php: call to cron_run()

      So i checked the database:

      select * from mdl_message_user_actions where userid=2691 and messageid=41588;
      /* Affected rows: 0 Gefundene Zeilen: 0 Warnungen: 0 Dauer von 1 query: 0,015 sec. */

      Maybe there is something wrong with the indexes? I don't now how to check that... Any ideas?

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Mar/19