Skip to content

Allowed memory size issue with update_groups_cache #2820

@wo14580

Description

@wo14580

Hi,

We're encountering a minor issue with the \local_o365\task\coursesync task. Our task_scheduled_max_runtime is configured for 30 minutes, but the script execution time ranges from 20 minutes to over 30 minutes. As a result, Moodle often terminates the script prematurely.

Here are the versions we're currently using:

  • Moodle: 4.3.10
  • moodle-local_o365: 4.3.6
  • Php 8.1

After investigating, we've found that the delay occurs when the script is fetching groups from the Graph API client:

The while loop in this method is taking too long to complete.
This is the exact line of code where the script is looping and ending prematurely:
local/o365/classes/rest/unified.php:199

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions