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

Task issues leading to lock concurrency limit being reached.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Tasks
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      Seeing the following in our cron logs:

      Scheduled task failed: Remove unused random questions (qtype_random\task\remove_unused_questions),Error writing to database !!! Error writing to database !!! !!! Error writing to database !!! Server Time: Mon, 19 Aug 2019 10:11:01 -0400   Skipping processing of scheduled tasks. Concurrency limit reached. Cron script completed correctly
      

      Execute scheduled task: Cleanup old sessions (core\task\session_cleanup_task)
       ... started 09:58:24. Current memory use 13.1MB.
       Cron script completed correctly
       Cron completed at 09:58:24. Memory used 3.9MB.
       Execution took 7.058505 seconds
       ... used 168 dbqueries
       ... used 22.103285074234 seconds
       Scheduled task complete: Cleanup old sessions (core\task\session_cleanup_task)
       !!! Coding error detected, it must be fixed by a programmer: A lock was created but not released at:
       [dirroot]/lib/cronlib.php on line 99
       
       Code should look like:
       
       $factory = \core\lock\lock_config::get_lock_factory('type');
        $lock = $factory->get_lock(de79c447-9137-4cad-8a37-b28cd76dfb0f);
        $lock->release();  // Locks must ALWAYS be released like this.
       
       !!!
       Server Time: Mon, 19 Aug 2019 09:59:16 -0400
       
      
      

      Followed by the following every time cron runs: 

      Skipping processing of scheduled tasks. Concurrency limit reached.
      Cron script completed correctly
      Cron completed at 23:59:05. Memory used 3.9MB.
      Execution took 3.052199 seconds
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              syxton Matthew Davidson
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: