tool_objectfs\task\generate_status_report hitting RDS memory limits

Open
#759 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
aws, mysql, php, postgresql
Domain
backend, database

Research direction

Start at tool_objectfs\task\generate_status_report and inspect how it builds the CTE and handles report generation. The issue proposes an optional path that populates a report table and purges it after each report; confirm the database behavior and existing tests for that task. Done means the report can run without exhausting database memory while retaining the existing default behavior.

Written by the indexing model from the issue text.

Description

There is a case that some Canada large Uni clients (York) have hit where the task that generates the status report is running out of memory when building a CTE.

In this case the problem is that MySQL (in theory that same could happen for PG) is creating a TEMP TABLE (in RAM) behind the scenes and running out a memory and failing as the record set is too much.

We have proposed a solution (not the default) where instead of creating the CTE we populate an actual report table (which gets purged after each report) so that the DB doesn't hit the same memory constraints.

See https://wrms.catalyst.net.nz/wr.php?request_id=493098

Dominant language
PHP
Stars
102
Forks
85
Avg merge
4d 21h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from catalyst/moodle-tool_objectfs

All issues in catalyst/moodle-tool_objectfs

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.